Skip to content

Commit

Permalink
Grow with scale factor as needed
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jan 9, 2022
1 parent c4d4c60 commit b118cb0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/glBars/DistrhoUIGLBars.cpp
Expand Up @@ -3,7 +3,7 @@
* Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
* Copyright (C) 2000 Christian Zander <phoenix@minion.de>
* Copyright (C) 2015 Nedko Arnaudov
* Copyright (C) 2016-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2016-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -30,7 +30,12 @@ DistrhoUIGLBars::DistrhoUIGLBars()
fInitialized(false),
fResizeHandle(this)
{
setGeometryConstraints(256, 256, true);
const double scaleFactor = getScaleFactor();

if (d_isNotZero(scaleFactor))
setSize(512*scaleFactor, 512*scaleFactor);

setGeometryConstraints(256*scaleFactor, 256*scaleFactor, true);

// no need to show resize handle if window is user-resizable
if (isResizable())
Expand Down

0 comments on commit b118cb0

Please sign in to comment.