Skip to content

Commit

Permalink
Made slight tweaks for high DPI displays
Browse files Browse the repository at this point in the history
  • Loading branch information
cpollard1001 committed Sep 28, 2015
1 parent 94851bc commit 4a802be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Draft/DraftGui.py
Expand Up @@ -568,9 +568,11 @@ def setupTray(self):
self.facecolorPix = QtGui.QPixmap(16,16)
self.facecolorPix.fill(self.facecolor)
self.facecolorButton.setIcon(QtGui.QIcon(self.facecolorPix))
self.widthButton = self._spinbox("widthButton", self.bottomtray, val=self.linewidth,hide=False,size=(50,22))
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General")
bsize = p.GetInt("ToolbarIconSize",24)+2
self.widthButton = self._spinbox("widthButton", self.bottomtray, val=self.linewidth,hide=False,size=(bsize * 2,bsize))
self.widthButton.setSuffix("px")
self.fontsizeButton = self._spinbox("fontsizeButton",self.bottomtray, val=self.fontsize,vmax=999, hide=False,double=True,size=(65,22))
self.fontsizeButton = self._spinbox("fontsizeButton",self.bottomtray, val=self.fontsize,vmax=999, hide=False,double=True,size=(bsize * 3,bsize))
self.applyButton = self._pushbutton("applyButton", self.toptray, hide=False, icon='Draft_Apply',width=22)

QtCore.QObject.connect(self.wplabel,QtCore.SIGNAL("pressed()"),self.selectplane)
Expand Down
6 changes: 6 additions & 0 deletions src/Mod/Web/Gui/BrowserView.cpp
Expand Up @@ -49,6 +49,7 @@
# include <QFileInfo>
# include <QDesktopServices>
# include <QMenu>
# include <QDesktopWidget>
#endif

#include "BrowserView.h"
Expand All @@ -74,6 +75,11 @@ using namespace Gui;
WebView::WebView(QWidget *parent)
: QWebView(parent)
{
// Increase html font size for high DPI displays
QRect mainScreenSize = QApplication::desktop()->screenGeometry();
if(mainScreenSize.width() > 1920){
setTextSizeMultiplier (mainScreenSize.width()/1920.0);
}
}

void WebView::wheelEvent(QWheelEvent *event)
Expand Down

0 comments on commit 4a802be

Please sign in to comment.