Skip to content

Commit

Permalink
Merge pull request #18 from mitchcapper/scaling_improvements
Browse files Browse the repository at this point in the history
scale note commits
  • Loading branch information
mitchcapper authored Jun 13, 2017
2 parents 70b701d + 4defc9b commit 1b65bc4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
14 changes: 12 additions & 2 deletions EntryTemplateManager.ChildViewer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
Expand Down Expand Up @@ -161,6 +161,14 @@ public static Dictionary<String, String> get_template_title_to_field_dict(IPlugi
}
return ret;
}

//private int ScaleX(int i) {
// return DpiUtil.ScaleIntX(i);
//}
//private int ScaleY(int i) {
// return DpiUtil.ScaleIntY(i);
//}

private bool InitializeChildView(TabPage page, String uuid) {
if (et_to_label != null) {
add_child_items_to_tab(page);
Expand Down Expand Up @@ -188,11 +196,13 @@ private bool InitializeChildView(TabPage page, String uuid) {
int CONTROL_WIDTH = TAB_WIDTH - LABEL_WIDTH - 55;
foreach (EntryTemplate t in cur) {
Label label = new Label();
label.Text = t.title + ":";
//label.AutoSize = false;
label.Top = control_offset_y;
label.Left = 0;
label.Text = t.title + ":";
label.AutoSize = false;
label.Width = LABEL_WIDTH;

label.AutoEllipsis = true;
label.TextAlign = ContentAlignment.MiddleRight;
FontUtil.AssignDefaultBold(label);
Expand Down
15 changes: 9 additions & 6 deletions KPEntryTemplates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -43,9 +44,11 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeePass">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\save\keepass_bin\KeePass.exe</HintPath>
<Private>False</Private>
</Reference>
Expand Down Expand Up @@ -105,11 +108,11 @@
<None Include="Resources\B16x16_KGPG_Info.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

0 comments on commit 1b65bc4

Please sign in to comment.