| | |
| | | addFlieRow.AddChidren(songNameBtn); |
| | | |
| | | var wText = songNameBtn.GetTextWidth();//获取文本宽度 |
| | | if (wText > 280) |
| | | if (wText >Application.GetRealWidth(220)) |
| | | { |
| | | songNameBtn.Width = Application.GetRealWidth(280); |
| | | songNameBtn.Width = Application.GetRealWidth(220); |
| | | } |
| | | else |
| | | { |
| | | songNameBtn.Width = wText + 5; |
| | | songNameBtn.Width = wText + Application.GetRealWidth(15); |
| | | } |
| | | //歌手控件 |
| | | Button singerBtn = new Button |
| | | { |
| | | X = songNameBtn.Right, |
| | | Y = Application.GetRealHeight(15), |
| | | Width = Application.GetRealWidth(280 - songNameBtn.Width), |
| | | Width = Application.GetRealWidth(220)- wText, |
| | | Height = Application.GetRealHeight(20), |
| | | TextColor = Color.MusicNoTxetColor, |
| | | TextSize = TextSize.Text12, |
| | |
| | | Text = "-" + player.A31PlayStatus.Artist.Trim(), |
| | | }; |
| | | addFlieRow.AddChidren(singerBtn); |
| | | if (wText > 280) |
| | | { |
| | | ///歌名长度小于250才可以显示歌手出来 |
| | | singerBtn.Width = Application.GetRealWidth(0); |
| | | } |
| | | } |
| | | else |
| | | { |