Browse Source

Added an option to the settings to make the mini player always on top. Fixes #67

pull/84/head
Samuel Attard 7 years ago
parent
commit
b1fec9c0f6
  1. 3
      Google Play Music/App.config
  2. 4
      Google Play Music/CoreMusicApp.States.cs
  3. 12
      Google Play Music/Properties/Settings.Designer.cs
  4. 3
      Google Play Music/Properties/Settings.settings
  5. 47
      Google Play Music/SettingsDialog.Designer.cs
  6. 6
      Google Play Music/SettingsDialog.cs

3
Google Play Music/App.config

@ -43,6 +43,9 @@
<setting name="MaxiZoomLevel" serializeAs="String">
<value>0</value>
</setting>
<setting name="MiniAlwaysOnTop" serializeAs="String">
<value>False</value>
</setting>
</Google_Play_Music.Properties.Settings>
</userSettings>
<runtime>

4
Google Play Music/CoreMusicApp.States.cs

@ -42,6 +42,8 @@ namespace Google_Play_Music
FormBorderStyle = FormBorderStyle.None;
Size = savedSize;
FormBorderStyle = FormBorderStyle.Sizable;
TopMost = false;
}
public void restoreMiniState()
@ -71,6 +73,8 @@ namespace Google_Play_Music
Location = savedPoint;
Size = savedSize;
setZoomRatio();
TopMost = Properties.Settings.Default.MiniAlwaysOnTop;
}
public void saveMaxiState()

12
Google Play Music/Properties/Settings.Designer.cs

@ -154,5 +154,17 @@ namespace Google_Play_Music.Properties {
this["MaxiZoomLevel"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MiniAlwaysOnTop {
get {
return ((bool)(this["MiniAlwaysOnTop"]));
}
set {
this["MiniAlwaysOnTop"] = value;
}
}
}
}

3
Google Play Music/Properties/Settings.settings

@ -35,5 +35,8 @@
<Setting Name="MaxiZoomLevel" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="MiniAlwaysOnTop" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

47
Google Play Music/SettingsDialog.Designer.cs

@ -40,18 +40,19 @@
this.lastFMPassword = new MaterialSkin.Controls.MaterialSingleLineTextField();
this.colorWheel1 = new Google_Play_Music.ColorWheel();
this.lastFMAuthIndicator = new MaterialSkin.Controls.MaterialLabel();
this.materialCheckBox4 = new MaterialSkin.Controls.MaterialCheckBox();
this.SuspendLayout();
//
// materialLabel1
//
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel1.Location = new System.Drawing.Point(411, 72);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(171, 18);
this.materialLabel1.Size = new System.Drawing.Size(176, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Custom Theme Highlight";
//
@ -59,7 +60,7 @@
//
this.materialCheckBox1.AutoSize = true;
this.materialCheckBox1.Depth = 0;
this.materialCheckBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
this.materialCheckBox1.Font = new System.Drawing.Font("Roboto", 10F);
this.materialCheckBox1.Location = new System.Drawing.Point(13, 97);
this.materialCheckBox1.Margin = new System.Windows.Forms.Padding(0);
this.materialCheckBox1.MouseLocation = new System.Drawing.Point(-1, -1);
@ -75,12 +76,12 @@
//
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel2.Location = new System.Drawing.Point(12, 71);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(117, 18);
this.materialLabel2.Size = new System.Drawing.Size(119, 19);
this.materialLabel2.TabIndex = 3;
this.materialLabel2.Text = "General Settings";
//
@ -100,8 +101,8 @@
//
this.materialCheckBox2.AutoSize = true;
this.materialCheckBox2.Depth = 0;
this.materialCheckBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
this.materialCheckBox2.Location = new System.Drawing.Point(13, 137);
this.materialCheckBox2.Font = new System.Drawing.Font("Roboto", 10F);
this.materialCheckBox2.Location = new System.Drawing.Point(13, 134);
this.materialCheckBox2.Margin = new System.Windows.Forms.Padding(0);
this.materialCheckBox2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialCheckBox2.MouseState = MaterialSkin.MouseState.HOVER;
@ -116,8 +117,8 @@
//
this.materialCheckBox3.AutoSize = true;
this.materialCheckBox3.Depth = 0;
this.materialCheckBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
this.materialCheckBox3.Location = new System.Drawing.Point(13, 177);
this.materialCheckBox3.Font = new System.Drawing.Font("Roboto", 10F);
this.materialCheckBox3.Location = new System.Drawing.Point(13, 171);
this.materialCheckBox3.Margin = new System.Windows.Forms.Padding(0);
this.materialCheckBox3.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialCheckBox3.MouseState = MaterialSkin.MouseState.HOVER;
@ -132,12 +133,12 @@
//
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel3.Location = new System.Drawing.Point(12, 248);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(115, 18);
this.materialLabel3.Size = new System.Drawing.Size(120, 19);
this.materialLabel3.TabIndex = 7;
this.materialLabel3.Text = "Last.fm Account";
//
@ -194,20 +195,37 @@
//
this.lastFMAuthIndicator.AutoSize = true;
this.lastFMAuthIndicator.Depth = 0;
this.lastFMAuthIndicator.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
this.lastFMAuthIndicator.ForeColor = System.Drawing.Color.Red;
this.lastFMAuthIndicator.Font = new System.Drawing.Font("Roboto", 11F);
this.lastFMAuthIndicator.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lastFMAuthIndicator.Location = new System.Drawing.Point(29, 325);
this.lastFMAuthIndicator.MouseState = MaterialSkin.MouseState.HOVER;
this.lastFMAuthIndicator.Name = "lastFMAuthIndicator";
this.lastFMAuthIndicator.Size = new System.Drawing.Size(93, 13);
this.lastFMAuthIndicator.Size = new System.Drawing.Size(131, 19);
this.lastFMAuthIndicator.TabIndex = 10;
this.lastFMAuthIndicator.Text = "Not Authenticated";
//
// materialCheckBox4
//
this.materialCheckBox4.AutoSize = true;
this.materialCheckBox4.Depth = 0;
this.materialCheckBox4.Font = new System.Drawing.Font("Roboto", 10F);
this.materialCheckBox4.Location = new System.Drawing.Point(12, 208);
this.materialCheckBox4.Margin = new System.Windows.Forms.Padding(0);
this.materialCheckBox4.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialCheckBox4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialCheckBox4.Name = "materialCheckBox4";
this.materialCheckBox4.Ripple = true;
this.materialCheckBox4.Size = new System.Drawing.Size(187, 30);
this.materialCheckBox4.TabIndex = 11;
this.materialCheckBox4.Text = "Mini Player always on top";
this.materialCheckBox4.UseVisualStyleBackColor = true;
//
// SettingsDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(600, 400);
this.Controls.Add(this.materialCheckBox4);
this.Controls.Add(this.lastFMAuthIndicator);
this.Controls.Add(this.lastFMPassword);
this.Controls.Add(this.lastFMUsername);
@ -242,5 +260,6 @@
private MaterialSkin.Controls.MaterialSingleLineTextField lastFMUsername;
private MaterialSkin.Controls.MaterialSingleLineTextField lastFMPassword;
private MaterialSkin.Controls.MaterialLabel lastFMAuthIndicator;
private MaterialSkin.Controls.MaterialCheckBox materialCheckBox4;
}
}

6
Google Play Music/SettingsDialog.cs

@ -76,6 +76,12 @@ namespace Google_Play_Music
});
};
materialCheckBox4.Checked = Properties.Settings.Default.MiniAlwaysOnTop;
materialCheckBox4.CheckStateChanged += (res, send) =>
{
Properties.Settings.Default.MiniAlwaysOnTop = materialCheckBox4.Checked;
};
materialRaisedButton1.Click += (res, send) =>
{
Properties.Settings.Default.Reset();

Loading…
Cancel
Save