From: Jon A. Cruz Date: Mon, 18 Jan 2010 02:11:50 +0000 (+1300) Subject: Added temp option to enable repositioning of not-quite-completed UI items in relayout. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8390bb8d5a1151ae5691586069450905b597a8c;p=inkscape.git Added temp option to enable repositioning of not-quite-completed UI items in relayout. --- diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 0c58a05f4..e73c17535 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -339,7 +339,8 @@ static char const preferences_skeleton[] = " empspacing=\"5\"/>\n" " \n" " \n" +" colorsontop=\"0\"\n" +" partialdynamic=\"0\"/>\n" " \n" " \n" "\n" diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 348bd74db..c4aa328b3 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1128,6 +1128,12 @@ void InkscapePreferences::initPageUI() _page_ui.add_line( false, _("Zoom correction factor (in %):"), _ui_zoom_correction, "", _("Adjust the slider until the length of the ruler on your screen matches its real length. This information is used when zooming to 1:1, 1:2, etc., to display objects in their true sizes"), true); + + _ui_partialdynamic.init( _("Enable dynamic relayout for incomplete sections."), "/options/workarounds/dynamicnotdone", false); + _page_ui.add_line( false, "", _ui_partialdynamic, "", + _("When on, will allow dynamic layout of components that are not completely finished being refactored."), true); + + this->AddPage(_page_ui, _("Interface"), PREFS_PAGE_UI); } diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 8ab840825..46542b0e1 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -200,6 +200,7 @@ protected: PrefCombo _misc_small_tools; PrefCheckButton _ui_colorsliders_top; PrefSpinButton _misc_recent; + PrefCheckButton _ui_partialdynamic; ZoomCorrRulerSlider _ui_zoom_correction; //Spellcheck diff --git a/src/ui/uxmanager.cpp b/src/ui/uxmanager.cpp index 7c080d3b8..3c6f85b91 100644 --- a/src/ui/uxmanager.cpp +++ b/src/ui/uxmanager.cpp @@ -19,6 +19,7 @@ #include "util/ege-tags.h" #include "widgets/toolbox.h" #include "widgets/desktop-widget.h" +#include "preferences.h" #ifdef GDK_WINDOWING_X11 #include @@ -88,26 +89,35 @@ void UXManager::setTask(SPDesktop* dt, gint val) { for (vector::iterator it = dtws.begin(); it != dtws.end(); ++it) { SPDesktopWidget* dtw = *it; + + gboolean notDone = Inkscape::Preferences::get()->getBool("/options/workarounds/dynamicnotdone", false); + if (dtw->desktop == dt) { switch (val) { default: case 0: dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT); dtw->setToolboxPosition("CommandsToolbar", GTK_POS_TOP); - //dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); + if (notDone) { + dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); + } dtw->setToolboxPosition("SnapToolbar", GTK_POS_TOP); break; case 1: dtw->setToolboxPosition("ToolToolbar", GTK_POS_TOP); dtw->setToolboxPosition("CommandsToolbar", GTK_POS_LEFT); - //dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); + if (notDone) { + dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); + } dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT); break; case 2: dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT); dtw->setToolboxPosition("CommandsToolbar", GTK_POS_RIGHT); dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT); - //dtw->setToolboxPosition("AuxToolbar", GTK_POS_RIGHT); + if (notDone) { + dtw->setToolboxPosition("AuxToolbar", GTK_POS_RIGHT); + } } } }