mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 04:44:25 -04:00
Merge pull request #2268 from defnax/appeareancepage
Fixed to hide ToolButton Style when the List View is used & set defau…
This commit is contained in:
commit
ccb39a87d8
3 changed files with 67 additions and 39 deletions
|
@ -136,6 +136,14 @@ void AppearancePage::updateRbtPageOnToolBar()
|
||||||
{
|
{
|
||||||
Settings->setPageButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
Settings->setPageButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
||||||
Settings->setActionButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
Settings->setActionButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
||||||
|
|
||||||
|
int index = ui.mainPageButtonType_CB->currentIndex();
|
||||||
|
if (index != 0) {
|
||||||
|
ui.cmboTollButtonsStyle->hide();
|
||||||
|
}else {
|
||||||
|
ui.cmboTollButtonsStyle->show();
|
||||||
|
}
|
||||||
|
|
||||||
NotifyQt::getInstance()->notifySettingsChanged();
|
NotifyQt::getInstance()->notifySettingsChanged();
|
||||||
}
|
}
|
||||||
void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); }
|
void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); }
|
||||||
|
@ -173,11 +181,11 @@ void AppearancePage::updateCmboToolButtonSize()
|
||||||
Settings->setListItemIconSize(16);
|
Settings->setListItemIconSize(16);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
|
||||||
Settings->setToolButtonSize(24);
|
Settings->setToolButtonSize(24);
|
||||||
Settings->setListItemIconSize(24);
|
Settings->setListItemIconSize(24);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
default:
|
||||||
Settings->setToolButtonSize(32);
|
Settings->setToolButtonSize(32);
|
||||||
Settings->setListItemIconSize(32);
|
Settings->setListItemIconSize(32);
|
||||||
break;
|
break;
|
||||||
|
@ -235,6 +243,13 @@ void AppearancePage::load()
|
||||||
}
|
}
|
||||||
whileBlocking(ui.cmboStyleSheet)->setCurrentIndex(index);
|
whileBlocking(ui.cmboStyleSheet)->setCurrentIndex(index);
|
||||||
|
|
||||||
|
index = ui.mainPageButtonType_CB->findData(Settings->getPageButtonLoc());
|
||||||
|
if (index != 0) {
|
||||||
|
ui.cmboTollButtonsStyle->hide();
|
||||||
|
}else {
|
||||||
|
ui.cmboTollButtonsStyle->show();
|
||||||
|
}
|
||||||
|
|
||||||
whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());
|
whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());
|
||||||
// ui.menuItemsButtonType_CB->setCurrentIndex(!Settings->getActionButtonLoc());
|
// ui.menuItemsButtonType_CB->setCurrentIndex(!Settings->getActionButtonLoc());
|
||||||
|
|
||||||
|
@ -262,10 +277,10 @@ void AppearancePage::load()
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(1);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(1);
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
default:
|
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(2);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(2);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
|
default:
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(3);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(3);
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1170</width>
|
<width>662</width>
|
||||||
<height>897</height>
|
<height>585</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
|
@ -249,6 +249,40 @@
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="frameToolListStyleGLayout">
|
<layout class="QGridLayout" name="frameToolListStyleGLayout">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QComboBox" name="cmboTollButtonsSize">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 8x8</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 16x16</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 24x24</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 32x32</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 64x64</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 128x128</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
||||||
<item>
|
<item>
|
||||||
|
@ -286,39 +320,18 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QComboBox" name="cmboTollButtonsSize">
|
<spacer name="verticalSpacer">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<property name="text">
|
<enum>Qt::Vertical</enum>
|
||||||
<string>Icon Size = 8x8</string>
|
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<property name="sizeHint" stdset="0">
|
||||||
<item>
|
<size>
|
||||||
<property name="text">
|
<width>20</width>
|
||||||
<string>Icon Size = 16x16</string>
|
<height>40</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</spacer>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 24x24</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 32x32</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 64x64</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 128x128</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -266,7 +266,7 @@ int RshareSettings::getToolButtonSize()
|
||||||
{
|
{
|
||||||
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
||||||
|
|
||||||
return value(SETTING_TOOLBUTTONSIZE, computeBestIconSize(6,sizes,24)).toInt();
|
return value(SETTING_TOOLBUTTONSIZE, computeBestIconSize(6,sizes,32)).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the tool button's size.*/
|
/** Sets the tool button's size.*/
|
||||||
|
@ -281,10 +281,10 @@ void RshareSettings::setToolButtonSize(int size)
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 16);
|
setValue(SETTING_TOOLBUTTONSIZE, 16);
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
default:
|
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 24);
|
setValue(SETTING_TOOLBUTTONSIZE, 24);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
|
default:
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue