diff --git a/share/ui/style.css b/share/ui/style.css index 82731cc80b33140f77a0bd920f2896a98b509ab7..1147aed2445266fa139ef24570d71feb566faf8f 100644 --- a/share/ui/style.css +++ b/share/ui/style.css @@ -1199,9 +1199,23 @@ popover.menu.menuize > stack > box > modelbutton:first-child > * /* Affect child color: @theme_selected_bg_color; } +/*Give extra 10 px to noebooks without menus*/ + +.notebook_nomenu tab{ + margin:0px; +} + +.notebook_nomenu tab:last-child{ + min-width:10px; + margin-right:-10px; +} + +#DialogMultipaned tabs{ + padding:0; +} /* ColorSlider */ #ColorSlider { - min-width : 96px; + min-width : 36px; min-height: 8px; } diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 62c0b44e9034e3a13615095e35d2f43f07fe7ae9..2ddd8e727aec1fcd23834c91b4175928b518748e 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -204,7 +204,7 @@ DocumentProperties::DocumentProperties() populate_available_profiles(); } }); - + _notebook.get_style_context()->add_class("notebook_nomenu"); _wr.setUpdating (true); build_page(); build_guides(); diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index ffb1cb94207b63192216c09a64193d3fff3bee03..6c96ae1dac784979d80b3026b05c02c5119e8a45 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -35,9 +35,9 @@ namespace Inkscape::UI::Dialog { FillAndStroke::FillAndStroke() : DialogBase("/dialogs/fillstroke", "FillStroke") - , _page_fill(Gtk::make_managed(1, 1, true, true)) - , _page_stroke_paint(Gtk::make_managed(1, 1, true, true)) - , _page_stroke_style(Gtk::make_managed(1, 1, true, true)) + , _page_fill(Gtk::make_managed(1, 1, true, true, 0, 0)) + , _page_stroke_paint(Gtk::make_managed(1, 1, true, true, 0, 0)) + , _page_stroke_style(Gtk::make_managed(1, 1, true, true, 0, 0)) , _composite_settings(INKSCAPE_ICON("dialog-fill-and-stroke"), "fillstroke", UI::Widget::SimpleFilterModifier::ISOLATION | @@ -47,19 +47,19 @@ FillAndStroke::FillAndStroke() , fillWdgt(nullptr) , strokeWdgt(nullptr) { - set_spacing(2); - UI::pack_start(*this, _notebook, true, true); + set_spacing(0); + UI::pack_start(*this, _notebook, false, false ); _notebook.append_page(*_page_fill, _createPageTabLabel(_("_Fill"), INKSCAPE_ICON("object-fill"))); _notebook.append_page(*_page_stroke_paint, _createPageTabLabel(_("Stroke _paint"), INKSCAPE_ICON("object-stroke"))); _notebook.append_page(*_page_stroke_style, _createPageTabLabel(_("Stroke st_yle"), INKSCAPE_ICON("object-stroke-style"))); - _notebook.set_vexpand(true); + _notebook.set_vexpand(false); _notebook.signal_switch_page().connect(sigc::mem_fun(*this, &FillAndStroke::_onSwitchPage)); - + _notebook.get_style_context()->add_class("notebook_nomenu"); _layoutPageFill(); _layoutPageStrokePaint(); - _layoutPageStrokeStyle(); + //_layoutPageStrokeStyle(); UI::pack_end(*this, _composite_settings, UI::PackOptions::shrink); @@ -149,8 +149,6 @@ void FillAndStroke::_layoutPageStrokeStyle() { strokeStyleWdgt = Gtk::make_managed(); - strokeStyleWdgt->set_hexpand(); - strokeStyleWdgt->set_halign(Gtk::ALIGN_START); _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1); } diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 272250f1978843ed5ba92e6ff5b962183b5ab6e5..73e2b5eceb59e42fe76500ec0ae31ed172816ab3 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -2101,6 +2101,7 @@ void InkscapePreferences::initPageUI() _grids_notebook.append_page(_grids_xy, _("Rectangular Grid")); _grids_notebook.append_page(_grids_axonom, _("Axonometric Grid")); _grids_notebook.append_page(grid_modular, _("Modular Grid")); + _grids_notebook.get_style_context()->add_class("notebook_nomenu"); { // Rectangular SPGrid properties _grids_xy_units.init("/options/grids/xy/units"); @@ -3144,6 +3145,7 @@ void InkscapePreferences::initKeyboardShortcuts(Gtk::TreeModel::iterator iter_ui _kb_shortcut_renderer.signal_accel_cleared().connect( sigc::mem_fun(*this, &InkscapePreferences::onKBTreeCleared) ); _kb_notebook.append_page(_kb_page_shortcuts, _("Shortcuts")); + _kb_notebook.get_style_context()->add_class("notebook_nomenu"); auto const shortcut_scroller = Gtk::make_managed(); shortcut_scroller->add(_kb_tree); shortcut_scroller->set_hexpand(); diff --git a/src/ui/dialog/tile.cpp b/src/ui/dialog/tile.cpp index ce6080f11441d1b722c70a7fc1bbb2ffe75dc5d0..4f74d1359d4844d832fe04b6e9e9830ca7fa26a4 100644 --- a/src/ui/dialog/tile.cpp +++ b/src/ui/dialog/tile.cpp @@ -65,6 +65,7 @@ ArrangeDialog::ArrangeDialog() _notebook->signal_switch_page().connect([=](Widget*, guint page){ update_arrange_btn(); }); + _notebook->get_style_context()->add_class("notebook_nomenu"); UI::pack_start(*this, *_arrangeBox); // Add button diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 736248605eec6c4241f8cda54fe6b9416e67a27b..d75fd510637dc76de88bc42df4c306e134285f55 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -117,6 +117,8 @@ Transformation::Transformation() _notebook.append_page(_page_transform, _("Matri_x"), true); layoutPageTransform(); + _notebook.get_style_context()->add_class("notebook_nomenu"); + _tabSwitchConn = _notebook.signal_switch_page().connect(sigc::mem_fun(*this, &Transformation::onSwitchPage)); // Apply separately diff --git a/src/ui/widget/notebook-page.cpp b/src/ui/widget/notebook-page.cpp index c2d211c9591a01e69a2fda9f73c066cb5c4ddd7e..a3d6ee93e9374d2bbf6652d158496e73f74bd892 100644 --- a/src/ui/widget/notebook-page.cpp +++ b/src/ui/widget/notebook-page.cpp @@ -20,16 +20,16 @@ namespace Inkscape { namespace UI { namespace Widget { -NotebookPage::NotebookPage(int n_rows, int n_columns, bool expand, bool fill, guint padding) +NotebookPage::NotebookPage(int n_rows, int n_columns, bool expand, bool fill, guint padding, guint spacing) : Gtk::Box(Gtk::ORIENTATION_VERTICAL) , _table(Gtk::make_managed()) { set_name("NotebookPage"); - property_margin().set_value(4); - set_spacing(4); + property_margin().set_value(spacing); + set_spacing(spacing); - _table->set_row_spacing(4); - _table->set_column_spacing(4); + _table->set_row_spacing(spacing); + _table->set_column_spacing(spacing); UI::pack_start(*this, *_table, expand, fill, padding); } diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h index 9c9bd067aa6a714fa02ff4efb8cf99057fe20a8d..6e1be8ba6c25370c13344688b381aa905f0f9c15 100644 --- a/src/ui/widget/notebook-page.h +++ b/src/ui/widget/notebook-page.h @@ -31,7 +31,7 @@ public: /** * Construct a NotebookPage. */ - NotebookPage(int n_rows, int n_columns, bool expand=false, bool fill=false, guint padding=0); + NotebookPage(int n_rows, int n_columns, bool expand=false, bool fill=false, guint padding=0, guint spacing = 4); Gtk::Grid& table() { return *_table; }