vod介面點擊範圍修正,跑馬燈閃爍問題
This commit is contained in:
parent
b32a86903c
commit
da604ab540
@ -7,7 +7,19 @@ namespace OverlayFormObj
|
||||
{
|
||||
public partial class OverlayForm : Form
|
||||
{
|
||||
|
||||
#region 防止閃屏
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
get
|
||||
{
|
||||
CreateParams cp = base.CreateParams;
|
||||
cp.ExStyle |= 0x02000000;
|
||||
return cp;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private string marqueeText = "這是跑馬燈文字示例 - 歡迎使用MediaPlayerForm!";
|
||||
private Color marqueeTextColor = Color.White;
|
||||
private string marqueeTextSecondLine = "";
|
||||
|
@ -295,7 +295,8 @@ namespace DualScreenDemo
|
||||
Panel separatorPanel = new Panel
|
||||
{
|
||||
Location = new Point(singerX , y + ItemHeight),
|
||||
Size = new Size(singerWidth + 20, 2),
|
||||
//Size = new Size(singerWidth + 20, 2),
|
||||
Size = new Size(730, 2),
|
||||
BackColor = Color.FromArgb(80, 255, 255, 255),
|
||||
Name = "SeparatorPanel_" + index.ToString()
|
||||
};
|
||||
@ -387,7 +388,7 @@ namespace DualScreenDemo
|
||||
songLabel.Font = new Font("微軟正黑體", 20, FontStyle.Bold);
|
||||
songLabel.Text = fullText;
|
||||
songLabel.Tag = song;
|
||||
songLabel.AutoSize = true;
|
||||
songLabel.AutoSize = false;
|
||||
// 創建歌手標籤
|
||||
Label artistLabel = new Label();
|
||||
artistLabel.Text = artistText;
|
||||
@ -424,7 +425,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
PictureBox icon = new PictureBox()
|
||||
{
|
||||
Image = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\其他符號_人聲\其他符號_人聲.png")),
|
||||
Image = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\Button\3.介面\其他符號_人聲.png")),
|
||||
SizeMode = PictureBoxSizeMode.Zoom,
|
||||
Size = new Size(30, 30),
|
||||
Location = new Point(songX + 5, y + 8)
|
||||
@ -434,13 +435,15 @@ namespace DualScreenDemo
|
||||
|
||||
// 有圖標時歌名右移
|
||||
songLabel.Location = new Point(songX + 42, y);
|
||||
songLabel.Size = new Size(songWidth - 47, ItemHeight - 20);
|
||||
//songLabel.Size = new Size(songWidth - 47, ItemHeight - 20);
|
||||
songLabel.Size = new Size(700, 66);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 沒有圖標時歌名置中
|
||||
songLabel.Location = new Point(songX, y);
|
||||
songLabel.Size = new Size(songWidth - 10, ItemHeight - 20);
|
||||
//songLabel.Size = new Size(songWidth - 10, ItemHeight - 20);
|
||||
songLabel.Size = new Size(700, 66);
|
||||
}
|
||||
// 歌手標籤位置調整
|
||||
artistLabel.Location = new Point(artistX, y + 33);
|
||||
@ -449,7 +452,8 @@ namespace DualScreenDemo
|
||||
Panel separatorPanel = new Panel
|
||||
{
|
||||
Location = new Point(songX - 5, y + ItemHeight - 2),
|
||||
Size = new Size(songWidth + artistWidth + 20, 2),
|
||||
//Size = new Size(songWidth + artistWidth + 20, 2),
|
||||
Size = new Size(730, 2),
|
||||
BackColor = Color.FromArgb(80, 255, 255, 255),
|
||||
Name = "SeparatorPanel_" + index.ToString()
|
||||
};
|
||||
@ -505,6 +509,7 @@ namespace DualScreenDemo
|
||||
// 确保控件层次正确
|
||||
songLabel.BringToFront();
|
||||
artistLabel.BringToFront();
|
||||
songLabel.TextAlign = ContentAlignment.TopLeft;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user