Fix system buttons padding on Windows.
This commit is contained in:
parent
66e47a0240
commit
30dba7a215
2 changed files with 5 additions and 0 deletions
|
|
@ -225,6 +225,7 @@ rpl::producer<int> TitleWidget::additionalPaddingValue() const {
|
|||
void TitleWidget::setAdditionalPadding(int padding) {
|
||||
Expects(_paddingHelper != nullptr);
|
||||
|
||||
padding /= window()->devicePixelRatio();
|
||||
if (_paddingHelper->padding.current() == padding) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "base/platform/win/base_windows_safe_library.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "base/integration.h"
|
||||
#include "base/invoke_queued.h"
|
||||
#include "base/debug_log.h"
|
||||
#include "styles/palette.h"
|
||||
#include "styles/style_widgets.h"
|
||||
|
|
@ -585,6 +586,9 @@ bool WindowHelper::handleNativeEvent(
|
|||
|
||||
case WM_DPICHANGED: {
|
||||
_dpi = LOWORD(wParam);
|
||||
InvokeQueued(_title, [=] {
|
||||
_title->refreshAdditionalPaddings(_handle);
|
||||
});
|
||||
} return false;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue