diff --git a/.gitignore b/.gitignore index 152aca2..d12846d 100644 --- a/.gitignore +++ b/.gitignore @@ -75,4 +75,10 @@ ipch # Visual Studio profiler .vspxproj -.vspx \ No newline at end of file +.vspx + +# Publish profiles +*.[Pp]ublish.xml +*.azurePubxml +*.pubxml +*.publishproj \ No newline at end of file diff --git a/GlucoseTaskbar.cs b/GlucoseTaskbar.cs index e7dd571..83da156 100644 --- a/GlucoseTaskbar.cs +++ b/GlucoseTaskbar.cs @@ -54,21 +54,33 @@ public GlucoseTaskbar() resourceManager = new("GlucoseTaskbar.Resources", typeof(Program).Assembly); nsData = new NightscoutData(); settingsForm = new(this, nsData); - controlPropertiesManager = new ControlPropertiesManager(this); SetOpacity(); CultureManager.SetCulture(); AttachMouseDownEventToControls(this); + float dpiScale = DeviceDpi / 96f; SensorBatteryPictureBox = new PictureBox() { - Size = new Size(19, 36), - Location = new Point(110, 0), + Size = new Size( + (int)(19 * dpiScale), + (int)(36 * dpiScale) + ), + Location = new Point( + (int)(110 * dpiScale), + (int)(0 * dpiScale) + ), Image = Properties.Resources.battery_no_signal, SizeMode = PictureBoxSizeMode.Zoom, }; CellPhoneBatteryPictureBox = new PictureBox() { - Size = new Size(19, 36), - Location = new Point(110, 0), + Size = new Size( + (int)(19 * dpiScale), + (int)(36* dpiScale) + ), + Location = new Point( + (int)(110 * dpiScale), + (int)(0 * dpiScale) + ), Image = Properties.Resources.battery_no_signal, SizeMode = PictureBoxSizeMode.Zoom, }; @@ -88,6 +100,7 @@ public GlucoseTaskbar() AttachMouseDownEventToControls(SettingsOpenLabel); SetTooltipsTexts(); SetContextMenuTexts(); + controlPropertiesManager = new ControlPropertiesManager(this); controlPropertiesManager.StoreOriginalProperties(this); controlPropertiesManager.StoreOriginalProperties(SensorBatteryPictureBox); controlPropertiesManager.StoreOriginalProperties(CellPhoneBatteryPictureBox); @@ -197,6 +210,7 @@ private void FillData() private void FillBattery() { + float dpiScale = DeviceDpi / 96f; decimal scale = Properties.Settings.Default.ProgramSize; static void SetBatteryValue(PictureBox pctBattery, int value, bool oldData) @@ -234,13 +248,17 @@ static void SetBatteryValue(PictureBox pctBattery, int value, bool oldData) else if (battery == settingsForm.BothRadioButton.Name) { this.Size = new Size(originalFormSize.Width + CellPhoneBatteryPictureBox.Width + (int)(2 * scale), originalFormSize.Height); - CellPhoneBatteryPictureBox.Location = new Point((int)(SensorBatteryPictureBox.Location.X + 20 * scale), (int)(SensorBatteryPictureBox.Location.Y * scale)); + CellPhoneBatteryPictureBox.Location = new Point( + (int)(SensorBatteryPictureBox.Location.X + (20 * dpiScale * (float)scale)), + (int)(SensorBatteryPictureBox.Location.Y * scale) + ); this.Controls.Add(SensorBatteryPictureBox); this.Controls.Add(CellPhoneBatteryPictureBox); } else if (battery == settingsForm.NoneRadioButton.Name) { this.Controls.Remove(SensorBatteryPictureBox); + this.Controls.Remove(CellPhoneBatteryPictureBox); this.Size = new Size(originalFormSize.Width - SensorBatteryPictureBox.Width, originalFormSize.Height); } diff --git a/GlucoseTaskbar.csproj b/GlucoseTaskbar.csproj index 09752d0..89b8616 100644 --- a/GlucoseTaskbar.csproj +++ b/GlucoseTaskbar.csproj @@ -6,7 +6,7 @@ enable true enable - 1.0.0 + 1.0.1 Rafael Assis Glucose Taskbar GlucoseTaskbar @@ -14,6 +14,7 @@ True Resources\GlucoseTaskbarIcon.ico True + Rafael Assis diff --git a/GlucoseTaskbar.csproj.user b/GlucoseTaskbar.csproj.user index a911471..b63df19 100644 --- a/GlucoseTaskbar.csproj.user +++ b/GlucoseTaskbar.csproj.user @@ -1,7 +1,7 @@  - <_LastSelectedProfileId>C:\Users\Ronaldo\Documents\Visual Studio 2022\Projects\GlucoseTaskbarProjects\GlucoseTaskbar\Properties\PublishProfiles\FolderProfile.pubxml + <_LastSelectedProfileId>C:\Users\Ronaldo\Documents\Visual Studio 2022\Projects\GlucoseTaskbar\Properties\PublishProfiles\FolderProfile.pubxml diff --git a/SettingsForm.Designer.cs b/SettingsForm.Designer.cs index c804325..963fdb8 100644 --- a/SettingsForm.Designer.cs +++ b/SettingsForm.Designer.cs @@ -77,6 +77,7 @@ private void InitializeComponent() label3 = new Label(); DocumentationLabel = new Label(); DocLinkLabel = new LinkLabel(); + label4 = new Label(); LogsTabPage.SuspendLayout(); NotificationsTabPage.SuspendLayout(); LatestReadsTabPage.SuspendLayout(); @@ -220,10 +221,10 @@ private void InitializeComponent() LatestReadsTabPage.Controls.Add(ComingSoonLastReadsLabel); LatestReadsTabPage.Controls.Add(LastReadsFormsPlot); LatestReadsTabPage.Controls.Add(LatestReadsLabel); - LatestReadsTabPage.Location = new Point(4, 29); + LatestReadsTabPage.Location = new Point(4, 24); LatestReadsTabPage.Name = "LatestReadsTabPage"; LatestReadsTabPage.Padding = new Padding(3); - LatestReadsTabPage.Size = new Size(803, 404); + LatestReadsTabPage.Size = new Size(803, 409); LatestReadsTabPage.TabIndex = 4; LatestReadsTabPage.Text = "Latest Reads"; // @@ -596,7 +597,7 @@ private void InitializeComponent() label3.AutoSize = true; label3.Font = new Font("Microsoft Sans Serif", 10F); label3.ForeColor = Color.Gray; - label3.Location = new Point(610, 531); + label3.Location = new Point(549, 531); label3.Name = "label3"; label3.Size = new Size(209, 17); label3.TabIndex = 20; @@ -622,10 +623,23 @@ private void InitializeComponent() DocLinkLabel.Text = "here"; DocLinkLabel.LinkClicked += DocLinkLabel_LinkClicked; // + // label4 + // + label4.AutoSize = true; + label4.Font = new Font("Microsoft Sans Serif", 10F); + label4.ForeColor = Color.Gray; + label4.Location = new Point(764, 531); + label4.Name = "label4"; + label4.Size = new Size(55, 17); + label4.TabIndex = 23; + label4.Text = "v. 1.0.1"; + // // SettingsForm // - AutoScaleMode = AutoScaleMode.None; + AutoScaleDimensions = new SizeF(9F, 20F); + AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(831, 557); + Controls.Add(label4); Controls.Add(SaveButton); Controls.Add(DocLinkLabel); Controls.Add(DocumentationLabel); @@ -714,5 +728,6 @@ private void InitializeComponent() private Label DocumentationLabel; private LinkLabel DocLinkLabel; private Label LatestReadsLabel; + private Label label4; } } \ No newline at end of file diff --git a/installer/GlucoseTaskbarInstaller.iss b/installer/GlucoseTaskbarInstaller.iss index 399e71b..aef5adc 100644 --- a/installer/GlucoseTaskbarInstaller.iss +++ b/installer/GlucoseTaskbarInstaller.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Glucose Taskbar" -#define MyAppVersion "1.0.0" +#define MyAppVersion "1.0.1" #define MyAppPublisher "GlucoseTaskbar" #define MyAppExeName "GlucoseTaskbar.exe" #define SourceDir "..\..\GlucoseTaskbar\bin\Release\net8.0-windows7.0"