Merge branch 'per-monitor-dpi-aware-controls-1' of https://github.com/MaartenBent/wxWidgets
Update the font of some buddy controls when the DPI changes. Fix the position of the statusbar after a DPI change. Add some changes that were suggested in https://github.com/wxWidgets/wxWidgets/pull/1499 but left out from it. Some sizes are cached to improve the speed of the library. These sizes become incorrect when the DPI changes. And are incorrect when a window is created on a display with a different DPI. Fix this by checking if the current DPI is the same as the DPI that was used when calculating the size, otherwise recalculate the size. Closes https://github.com/wxWidgets/wxWidgets/pull/1530
This commit is contained in:
@@ -3322,15 +3322,15 @@ public:
|
||||
/**
|
||||
@class wxDPIChangedEvent
|
||||
|
||||
Event sent when the resolution (measured in dots-per-inch, or DPI) of the
|
||||
monitor a window is on changes.
|
||||
Event sent when the display scale factor or pixel density (measured in
|
||||
dots-per-inch, or DPI) of the monitor a window is on changes.
|
||||
|
||||
The event is sent to each wxTopLevelWindow affected by the change, and all
|
||||
its children recursively. For example, this event is sent to the window
|
||||
when it is moved, by the user, from a display using some DPI value to
|
||||
another display using a different DPI value. It also sent to all program
|
||||
windows on the given display if its DPI changes due to a change in the
|
||||
system settings.
|
||||
its children recursively (post-order traversal). For example, this event is
|
||||
sent to the window when it is moved, by the user, from a display using some
|
||||
DPI value to another display using a different DPI value. It also sent to
|
||||
all program windows on the given display if its DPI changes due to a change
|
||||
in the system settings.
|
||||
|
||||
Currently this event is generated by wxMSW port if only and only if the
|
||||
MSW application runs under Windows 10 Creators Update (v1703) or later and
|
||||
@@ -3359,15 +3359,11 @@ class wxDPIChangedEvent : public wxEvent
|
||||
public:
|
||||
/**
|
||||
Returns the old DPI.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
wxSize GetOldDPI() const;
|
||||
|
||||
/**
|
||||
Returns the new DPI.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
wxSize GetNewDPI() const;
|
||||
};
|
||||
|
Reference in New Issue
Block a user