-
-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remember Popped-up Chat Size #5635
Changes from 1 commit
919350a
5755dc0
a703be9
e7fa51b
bc8fb22
0025788
262b101
7f04d41
bf9b4ba
c7ce348
8e10167
00e99fe
6d00c26
2798407
011d4da
c7ac0fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,9 @@ Window::Window(WindowType type, QWidget *parent) | |
} | ||
else | ||
{ | ||
this->resize(int(300 * this->scale()), int(500 * this->scale())); | ||
this->resize(int(getSettings()->lastPopupWidth.getValue() * this->scale()), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions] this->resize(int(getSettings()->lastPopupWidth.getValue() * this->scale()),
^ |
||
int(getSettings()->lastPopupHeight.getValue() * this->scale()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this shouldn't multiply by the scale, since that affects the size. The scenario would be:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions] int(getSettings()->lastPopupHeight.getValue() * this->scale())
^ |
||
); | ||
} | ||
|
||
this->signalHolder_.managedConnect(getApp()->getHotkeys()->onItemsUpdated, | ||
|
@@ -148,7 +150,12 @@ void Window::closeEvent(QCloseEvent *) | |
getApp()->getWindows()->save(); | ||
getApp()->getWindows()->closeAll(); | ||
} | ||
|
||
else | ||
{ | ||
QRect rect = this->getBounds(); | ||
getSettings()->lastPopupWidth.setValue(rect.width()); | ||
getSettings()->lastPopupHeight.setValue(rect.height()); | ||
} | ||
// Ensure selectedWindow_ is never an invalid pointer. | ||
// WindowManager will return the main window if no window is pointed to by | ||
// `selectedWindow_`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, this should save a
QSize
. That would require a specialization forpajlada::[De]Serialize
like forHighlightBadge
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're up for it, this would be a nice addition