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