View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037214 | Lazarus | IDE | public | 2020-06-14 11:26 | 2021-03-18 14:21 |
Reporter | Sven Barth | Assigned To | Balázs Székely | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | X86_64 | OS | Windows NT | ||
Product Version | 2.1 (SVN) | ||||
Summary | 0037214: IDE does not remember width of CoolBar | ||||
Description | In my IDE with AnchorDocking enabled (and HighDPI) the width of the CoolBar is not remembered, instead its roughly twice the size when I restart the IDE. See attached screenshots (one is before restarting the IDE with my desired width, the other is directly after a restart) | ||||
Additional Information | I've tested with a completely new configuration. The only change I did was to enable the CoolBar. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r.64835 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
related to | 0037887 | closed | Juha Manninen | HighDPI: Icon of component select button not sized correctly |
|
|
|
Strange. I cannot reproduce. I just tested with Lazarus IDE built with QT5 bindings. |
|
Sorry for the late response. I've played around with it a bit: it happens if I play with the splitter of the coolbar and it might also be DPI dependent (200% for me). E.g.: - start Lazarus - size the coolbar - restart Lazarus (the environmentoptions.xml will contain a width around twice the expected size) - splitter for coolbar will be at wrong position Some times it works correctly however when I resize the coolbar, close Lazarus (not restart!) and start it again, but not always. If I manually adjust the width inside the environmentoptions.xml then it's loaded correctly and closing/restarting retains the value, but as soon as I touch the splitter the wrong value will be stored. |
|
Does this happen with Anchordocking only, or also with the normal undocked IDE? |
|
Oh, so that's why the component palette keeps moving over! I can reproduce this exactly like Sven described (on Win32, DPI scaling 125%), both with and without Anchordocking. |
|
Please test with the attached patch. coolbar.patch (806 bytes)
Index: ide/mainbar.pas =================================================================== --- ide/mainbar.pas (revision 64820) +++ ide/mainbar.pas (working copy) @@ -673,7 +673,7 @@ if EnvironmentOptions.Desktop.ComponentPaletteOptions.Visible then begin CoolBar.Align := alLeft; - CoolBar.Width := EnvironmentOptions.Desktop.IDECoolBarOptions.Width; + CoolBar.Width := MainIDEBar.Scale96ToForm(EnvironmentOptions.Desktop.IDECoolBarOptions.Width); end else CoolBar.Align := alClient; @@ -803,7 +803,7 @@ procedure TMainIDEBar.MainSplitterMoved(Sender: TObject); begin - EnvironmentOptions.Desktop.IDECoolBarOptions.Width := CoolBar.Width; + EnvironmentOptions.Desktop.IDECoolBarOptions.Width := MainIDEBar.ScaleFormTo96(CoolBar.Width); SetMainIDEHeight; end; |
|
Works correct with that patch though I dropped the MainIDEBar from the call to ScaleFormTo96 as using the global variable is unnecessary. |
|
@Sven "I dropped the MainIDEBar from the call to ScaleFormTo96 as using the global variable is unnecessary. " You're right, MainIDEBar it's looking silly here. I copy-pasted the code from another unit where it was necessary, forgot to remove it. Thanks for the correction. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-06-14 11:26 | Sven Barth | New Issue | |
2020-06-14 11:26 | Sven Barth | File Added: lazarus-coolbar-after-restart.png | |
2020-06-14 11:26 | Sven Barth | File Added: lazarus-coolbar-before-restart.png | |
2020-06-14 11:31 | Juha Manninen | Note Added: 0123432 | |
2020-10-02 23:16 | Sven Barth | Note Added: 0126045 | |
2021-02-28 22:10 | Juha Manninen | Relationship added | related to 0037887 |
2021-03-11 19:33 | wp | Note Added: 0129574 | |
2021-03-14 20:02 | Martok | Note Added: 0129664 | |
2021-03-15 14:56 | Balázs Székely | Note Added: 0129688 | |
2021-03-15 14:56 | Balázs Székely | File Added: coolbar.patch | |
2021-03-16 20:28 | Sven Barth | Note Added: 0129720 | |
2021-03-16 22:13 | Balázs Székely | Note Added: 0129723 | |
2021-03-18 14:10 | Balázs Székely | Assigned To | => Balázs Székely |
2021-03-18 14:10 | Balázs Székely | Status | new => assigned |
2021-03-18 14:10 | Balázs Székely | LazTarget | => - |
2021-03-18 14:20 | Balázs Székely | Status | assigned => resolved |
2021-03-18 14:20 | Balázs Székely | Resolution | open => fixed |
2021-03-18 14:20 | Balázs Székely | Fixed in Revision | => r.64835 |
2021-03-18 14:20 | Balázs Székely | Widgetset | Win32/Win64 => Win32/Win64 |
2021-03-18 14:21 | Balázs Székely | Status | resolved => closed |