歌手顯示模式與字體更改
This commit is contained in:
parent
7b2e5a8196
commit
e77f13a05f
@ -383,7 +383,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
// 歌手名稱設置點
|
// 歌手名稱設置點
|
||||||
string artistText = song.getArtist_A(IsSimplified);
|
string artistText = song.getArtist_A(IsSimplified);
|
||||||
|
if (song.getB() != null) { artistText+="+"+ song.getArtist_B(IsSimplified); }
|
||||||
string fullText = songText + statusText;
|
string fullText = songText + statusText;
|
||||||
int textLength = fullText.Length;
|
int textLength = fullText.Length;
|
||||||
|
|
||||||
@ -466,13 +466,14 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
// 根據文字長度設置字體大小
|
// 根據文字長度設置字體大小
|
||||||
int fold = 14;
|
int fold = 14;
|
||||||
if (artistText.Length > 6)
|
//if (artistText.Length > 6)
|
||||||
fold = 10;
|
// fold = 10;
|
||||||
else if (artistText.Length > 3)
|
//else if (artistText.Length > 3)
|
||||||
fold = 12;
|
// fold = 12;
|
||||||
artistLabel.Font = new Font("微軟正黑體", fold, FontStyle.Bold);
|
artistLabel.Font = new Font("微軟正黑體", fold, FontStyle.Bold);
|
||||||
|
|
||||||
artistLabel.ForeColor = Color.FromArgb(30,144,255);
|
//artistLabel.ForeColor = Color.FromArgb(30,144,255);
|
||||||
|
artistLabel.ForeColor = Color.FromArgb(36,209,216);
|
||||||
songLabel.TextAlign = ContentAlignment.MiddleLeft;
|
songLabel.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
artistLabel.TextAlign = ContentAlignment.MiddleRight;
|
artistLabel.TextAlign = ContentAlignment.MiddleRight;
|
||||||
// 確保背景透明
|
// 確保背景透明
|
||||||
@ -488,7 +489,8 @@ namespace DualScreenDemo
|
|||||||
// 定義滑鼠離開 (MouseLeave) 事件的處理程序
|
// 定義滑鼠離開 (MouseLeave) 事件的處理程序
|
||||||
EventHandler mouseLeave = (sender, e) => {
|
EventHandler mouseLeave = (sender, e) => {
|
||||||
songLabel.ForeColor = color;
|
songLabel.ForeColor = color;
|
||||||
artistLabel.ForeColor = Color.FromArgb(30, 144, 255);
|
//artistLabel.ForeColor = Color.FromArgb(30, 144, 255);
|
||||||
|
artistLabel.ForeColor = Color.FromArgb(36,209,216);
|
||||||
separatorPanel.BackColor = Color.FromArgb(80, 255, 255, 255);
|
separatorPanel.BackColor = Color.FromArgb(80, 255, 255, 255);
|
||||||
};
|
};
|
||||||
// 添加事件处理
|
// 添加事件处理
|
||||||
|
Loading…
x
Reference in New Issue
Block a user