Commit 0d66634a authored by Dirk Wilden's avatar Dirk Wilden

toolbarSize option added

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8662 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b8c4f099
......@@ -85,6 +85,13 @@ void Core::applyOptions(){
// Logger
coreWidget_->showLogger( OpenFlipper::Options::loggerState() );
// Toolbar Size
switch ( OpenFlipperSettings().value("Core/Toolbar/iconSize",0).toInt() ){
case 1 : coreWidget_->setIconSize( QSize(16,16) );break;
case 2 : coreWidget_->setIconSize( QSize(32,32) );break;
default : coreWidget_->setIconSize( coreWidget_->defaultIconSize() );
}
// gl mouse cursor
coreWidget_->setForceNativeCursor( OpenFlipperSettings().value("Core/Gui/glViewer/nativeMouse",false).toBool() );
......
......@@ -128,6 +128,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
{
setupStatusBar();
defaultIconSize_ = iconSize();
toolSplitter_ = new QSplitter(Qt::Horizontal,this);
setCentralWidget(toolSplitter_);
......
......@@ -369,10 +369,14 @@ public:
/// Use native or gl painted cursor
void setForceNativeCursor ( bool _state );
QSize defaultIconSize();
private:
OpenFlipper::Options::LoggerState loggerState_;
uint fullscreenState_;
QSize defaultIconSize_;
/** @} */
......
......@@ -135,5 +135,8 @@ void CoreWidget::slotRemoveToolbar(QToolBar* _toolbar) {
emit log(LOGERR,tr("Remove Toolbar: Toolbar not found.") );
}
QSize CoreWidget::defaultIconSize(){
return defaultIconSize_;
}
//=============================================================================
......@@ -236,6 +236,16 @@ void OptionsWidget::showEvent ( QShowEvent * /*event*/ ) {
splash->setChecked( OpenFlipperSettings().value("Core/Gui/splash",true).toBool() );
toolbox->setChecked( !OpenFlipper::Options::hideToolbox() );
iconSmall->setChecked(false);
iconNormal->setChecked(false);
iconDefault->setChecked(false);
switch ( OpenFlipperSettings().value("Core/Toolbar/iconSize",0).toInt() ){
case 1 : iconSmall->setChecked(true); break;
case 2 : iconNormal->setChecked(true); break;
default : iconDefault->setChecked(true);
}
loggerHidden->setChecked( OpenFlipper::Options::loggerState() == OpenFlipper::Options::Hidden);
loggerNormal->setChecked( OpenFlipper::Options::loggerState() == OpenFlipper::Options::Normal);
loggerInScene->setChecked( OpenFlipper::Options::loggerState() == OpenFlipper::Options::InScene);
......@@ -555,6 +565,13 @@ void OptionsWidget::slotApply() {
OpenFlipperSettings().setValue("Core/Log/logFileEnabled",enableLogFile->isChecked());
OpenFlipperSettings().setValue("Core/Log/logFile",logFile->text());
if ( iconDefault->isChecked() )
OpenFlipperSettings().setValue("Core/Toolbar/iconSize", 0);
else if ( iconSmall->isChecked() )
OpenFlipperSettings().setValue("Core/Toolbar/iconSize", 1);
else if ( iconNormal->isChecked() )
OpenFlipperSettings().setValue("Core/Toolbar/iconSize", 2);
//viewer
OpenFlipperSettings().setValue("Core/Mouse/Wheel/ZoomFactor", wZoomFactor->text().toDouble());
OpenFlipperSettings().setValue("Core/Mouse/Wheel/ZoomFactorShift", wZoomFactorShift->text().toDouble());
......
......@@ -23,7 +23,7 @@
<string/>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<property name="usesScrollButtons">
<bool>true</bool>
......@@ -92,6 +92,39 @@
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_11">
<property name="title">
<string>Toolbar Size</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_22">
<item>
<widget class="QRadioButton" name="iconDefault">
<property name="text">
<string>System default</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="iconSmall">
<property name="text">
<string>Small Icons</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="iconNormal">
<property name="text">
<string>Normal Icons</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment