mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 21:29:01 -04:00
Replaced font handling by FontSizeHandler and reenabled deactivated item delegates
This commit is contained in:
parent
93154fddc4
commit
973246624f
31 changed files with 196 additions and 383 deletions
|
@ -67,7 +67,6 @@
|
|||
#include "notifyqt.h"
|
||||
#include "common/UserNotify.h"
|
||||
#include "gui/ServicePermissionDialog.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
#ifdef UNFINISHED
|
||||
#include "unfinished/ApplicationWindow.h"
|
||||
|
@ -361,6 +360,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
settingsChanged();
|
||||
|
||||
mFontSizeHandler.registerFontSize(ui->listWidget, 1.5f);
|
||||
}
|
||||
|
||||
/** Destructor. */
|
||||
|
@ -1642,8 +1643,6 @@ void MainWindow::settingsChanged()
|
|||
ui->toolBarAction->setIconSize(QSize(toolSize,toolSize));
|
||||
int itemSize = Settings->getListItemIconSize();
|
||||
ui->listWidget->setIconSize(QSize(itemSize,itemSize));
|
||||
|
||||
updateFontSize();
|
||||
}
|
||||
|
||||
void MainWindow::externalLinkActivated(const QUrl &url)
|
||||
|
@ -1823,23 +1822,6 @@ void MainWindow::setCompactStatusMode(bool compact)
|
|||
//opModeStatus: TODO Show only ???
|
||||
}
|
||||
|
||||
void MainWindow::updateFontSize()
|
||||
{
|
||||
#if defined(Q_OS_DARWIN)
|
||||
int customFontSize = Settings->valueFromGroup("File", "MinimumFontSize", 13).toInt();
|
||||
#else
|
||||
int customFontSize = Settings->valueFromGroup("File", "MinimumFontSize", 11).toInt();
|
||||
#endif
|
||||
QFont newFont = ui->listWidget->font();
|
||||
if (newFont.pointSize() != customFontSize) {
|
||||
newFont.setPointSize(customFontSize);
|
||||
QFontMetricsF fontMetrics(newFont);
|
||||
int iconHeight = fontMetrics.height()*1.5;
|
||||
ui->listWidget->setFont(newFont);
|
||||
ui->listWidget->setIconSize(QSize(iconHeight, iconHeight));
|
||||
}
|
||||
}
|
||||
|
||||
Gui_InputDialogReturn MainWindow::guiInputDialog(const QString& windowTitle, const QString& labelText, QLineEdit::EchoMode textEchoMode, bool modal)
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue