Windows dpi scaling.

This commit is contained in:
Shyotl
2018-04-09 02:08:46 -05:00
parent 50a0902f92
commit d3e1edcc93
8 changed files with 143 additions and 11 deletions

View File

@@ -181,6 +181,7 @@ public:
/*virtual*/ void handleDataCopy(LLWindow *window, S32 data_type, void *data);
/*virtual*/ BOOL handleTimerEvent(LLWindow *window);
/*virtual*/ BOOL handleDeviceChange(LLWindow *window);
/*virtual*/ bool handleDPIScaleChange(LLWindow *window, float xDPIScale, float yDPIScale, U32 width = 0, U32 height = 0);
/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);
/*virtual*/ void handlePauseWatchdog(LLWindow *window);
@@ -393,6 +394,8 @@ public:
const LLVector2& getDisplayScale() const { return mDisplayScale; }
void calcDisplayScale();
LLVector2 getUIScale() const;
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
static bool onAlert(const LLSD& notify);
@@ -464,6 +467,9 @@ protected:
bool mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings
U32 mCurrResolutionIndex;
float mDPIScaleX;
float mDPIScaleY;
protected:
static std::string sSnapshotBaseName;
static std::string sSnapshotDir;