mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
attempt to fix emoticons sizes on high DPI screens
This commit is contained in:
parent
3386238f35
commit
4ef1b08ee8
@ -164,8 +164,8 @@ void Emoticons::showSmileyWidget(QWidget *parent, QWidget *button, const char *s
|
||||
smGLayout->addWidget(smTab);
|
||||
}
|
||||
|
||||
const int buttonWidth = QFontMetricsF(smWidget->font()).height()*2;
|
||||
const int buttonHeight = QFontMetricsF(smWidget->font()).height()*2;
|
||||
const int buttonWidth = QFontMetricsF(smWidget->font()).height()*1.2;
|
||||
const int buttonHeight = QFontMetricsF(smWidget->font()).height()*1.2;
|
||||
int maxRowCount = 0;
|
||||
int maxCountPerLine = 0;
|
||||
|
||||
@ -179,7 +179,12 @@ void Emoticons::showSmileyWidget(QWidget *parent, QWidget *button, const char *s
|
||||
if (! bOnlyOneGroup)
|
||||
{
|
||||
tabGrpWidget = new QWidget(smTab);
|
||||
smTab->setIconSize(QSize(24,24));
|
||||
|
||||
// (Cyril) Never use an absolute size. It needs to be scaled to the actual font size on the screen.
|
||||
//
|
||||
QFontMetricsF fm(parent->font()) ;
|
||||
smTab->setIconSize(QSize(32*fm.height()/14.0,32*fm.height()/14.0));
|
||||
|
||||
if (groupName.right(4).toLower() == ".png")
|
||||
smTab->addTab( tabGrpWidget, QIcon(groupName), "");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user