Added Fonts settings

This commit is contained in:
defnax 2025-02-06 20:20:28 +01:00
parent 18f4ef5574
commit 533caea81e
4 changed files with 187 additions and 134 deletions

View File

@ -101,6 +101,9 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.mainPageButtonType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(updateRbtPageOnToolBar() ));
// connect(ui.menuItemsButtonType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(updateActionButtonLoc() ));
connect(ui.minimumFontSize_SB, SIGNAL(valueChanged(int)), this, SLOT(updateFontSize())) ;
}
void AppearancePage::switch_status_grpStatus(bool b) { switch_status(MainWindow::StatusGrpStatus ,"ShowStatusBar", b) ; }
@ -360,3 +363,10 @@ void AppearancePage::load()
whileBlocking(ui.checkBoxShowSystrayOnStatus)->setChecked(Settings->valueFromGroup("StatusBar", "ShowSysTrayOnStatusBar", QVariant(false)).toBool());
}
void AppearancePage::updateFontSize()
{
Settings->beginGroup(QString("File"));
Settings->setValue("MinimumFontSize", ui.minimumFontSize_SB->value());
Settings->endGroup();
}

View File

@ -71,6 +71,8 @@ private slots:
// void updateCmboListItemSize();
void updateStyle() ;
void updateFontSize();
private:
void switch_status(MainWindow::StatusElement s,const QString& key,bool b);

View File

@ -14,22 +14,7 @@
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" name="AppearancePageGLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="grpLanguage">
<property name="minimumSize">
<size>
@ -86,110 +71,12 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="grpStyle">
<property name="minimumSize">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string/>
</property>
<property name="title">
<string>Style</string>
</property>
<layout class="QGridLayout" name="grpStyleGLayout">
<item row="0" column="0">
<widget class="RSComboBox" name="cmboStyle">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Choose RetroShare's interface style</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="grpStyleHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>215</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="grpStyleSheet">
<property name="minimumSize">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="title">
<string>Style Sheet</string>
</property>
<layout class="QGridLayout" name="grpStyleSheetGLayout">
<item row="0" column="0">
<widget class="RSComboBox" name="cmboStyleSheet">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="grpStyleSheetHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>215</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="8" column="0">
<spacer name="AppearancePageVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>361</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="0">
<item row="3" column="0">
<widget class="QGroupBox" name="grpToolBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>228</height>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
@ -198,8 +85,8 @@
<property name="title">
<string>Tool Bar</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labelPageToolBar">
@ -237,7 +124,7 @@
</item>
</layout>
</item>
<item>
<item row="1" column="0">
<widget class="QFrame" name="frameToolListStyle">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -289,19 +176,6 @@
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="RSComboBox" name="cmboTollButtonsSize">
<item>
@ -352,10 +226,79 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="7" column="0">
<item row="3" column="1">
<widget class="QGroupBox" name="grpFonts">
<property name="title">
<string>Fonts</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="minimumFontSizeHLayout">
<item>
<widget class="QLabel" name="minimumFontSizeLabel">
<property name="text">
<string>Minimum font size </string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="minimumFontSize_SB">
<property name="minimum">
<number>11</number>
</property>
<property name="maximum">
<number>64</number>
</property>
</widget>
</item>
<item>
<spacer name="minimumFontSizeHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>188</width>
<height>96</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QGroupBox" name="grpStatus">
<property name="title">
<string>Status Bar</string>
@ -464,6 +407,104 @@
</layout>
</widget>
</item>
<item row="5" column="0" colspan="2">
<spacer name="AppearancePageVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>361</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="grpStyle">
<property name="minimumSize">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string/>
</property>
<property name="title">
<string>Style</string>
</property>
<layout class="QGridLayout" name="grpStyleGLayout">
<item row="0" column="0">
<widget class="RSComboBox" name="cmboStyle">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Choose RetroShare's interface style</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="grpStyleHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>215</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="grpStyleSheet">
<property name="minimumSize">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="title">
<string>Style Sheet</string>
</property>
<layout class="QGridLayout" name="grpStyleSheetGLayout">
<item row="0" column="0">
<widget class="RSComboBox" name="cmboStyleSheet">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="grpStyleSheetHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>215</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>

View File

@ -14,7 +14,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">