mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-21 06:15:47 +02:00
Force video player UI layout update to work around an edge case
This commit is contained in:
parent
710a7524a1
commit
d2ed2b4a00
1
video/FormPlayer.Designer.cs
generated
1
video/FormPlayer.Designer.cs
generated
@ -83,6 +83,7 @@ private void InitializeComponent() {
|
||||
this.tablePanelFull.Controls.Add(this.imageDownload, 4, 0);
|
||||
this.tablePanelFull.Controls.Add(this.imageClose, 0, 0);
|
||||
this.tablePanelFull.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.tablePanelFull.Enabled = false;
|
||||
this.tablePanelFull.Location = new System.Drawing.Point(0, 86);
|
||||
this.tablePanelFull.Name = "tablePanelFull";
|
||||
this.tablePanelFull.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
|
@ -95,7 +95,7 @@ private int DpiScaled(int value){
|
||||
|
||||
private void RefreshControlPanel(){
|
||||
bool useCompactLayout = ClientSize.Width < DpiScaled(480);
|
||||
bool needsUpdate = useCompactLayout ? tablePanelFull.Enabled : tablePanelCompactBottom.Enabled;
|
||||
bool needsUpdate = !timerSync.Enabled || (useCompactLayout ? tablePanelFull.Enabled : tablePanelCompactBottom.Enabled);
|
||||
|
||||
if (needsUpdate){
|
||||
void Disable(TableLayoutPanel panel){
|
||||
@ -169,12 +169,12 @@ private void player_PlayStateChange(int newState){
|
||||
else if (state == WMPPlayState.wmppsPlaying){
|
||||
Player.PlayStateChange -= player_PlayStateChange;
|
||||
|
||||
timerSync.Start();
|
||||
NativeMethods.SetWindowOwner(Handle, ownerHandle);
|
||||
Cursor.Current = Cursors.Default;
|
||||
|
||||
SuspendLayout();
|
||||
timerSync_Tick(timerSync, EventArgs.Empty);
|
||||
timerSync.Start();
|
||||
Opacity = 1;
|
||||
ResumeLayout(true);
|
||||
}
|
||||
@ -220,7 +220,6 @@ private void timerSync_Tick(object sender, EventArgs e){
|
||||
if (ClientSize != newSize || Location != newLocation){
|
||||
ClientSize = newSize;
|
||||
Location = newLocation;
|
||||
|
||||
RefreshControlPanel();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user