1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-23 03:15:48 +02:00

Fix video player seek bar resizing when clipped & adjust min window size

This commit is contained in:
chylex 2018-11-23 04:13:39 +01:00
parent 250d502238
commit 8d536a6734
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ protected override void OnPaint(PaintEventArgs e){
brushBack.Color = Parent.BackColor;
}
Rectangle rect = e.ClipRectangle;
Rectangle rect = new Rectangle(0, 0, Width, Height);
Point cursor = PointToClient(Cursor.Position);
int width = rect.Width-1;
int progress = (int)(width*((double)Value/Maximum));

View File

@ -200,8 +200,8 @@ private void timerSync_Tick(object sender, EventArgs e){
int ownerWidth = rect.Right-rect.Left+1;
int ownerHeight = rect.Bottom-rect.Top+1;
// roughly matches MinimumSize for client bounds
int minWidth = DpiScaled(332);
// roughly matches MinimumSize for client bounds, adjusted a bit for weirdness with higher DPI
int minWidth = DpiScaled(356);
int minHeight = DpiScaled(386);
if (NativeMethods.GetClientRect(ownerHandle, out NativeMethods.RECT clientSize)){