summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-05-06 11:02:22 +0000
committertavmjong-free <tavmjong@free.fr>2016-05-06 11:02:22 +0000
commit28d4af68e5f0c3c157b97fd857ef676657b35e01 (patch)
tree65cc1de05c4dc7a139381d0bc486c07cca7689c5 /src
parentFix rendering of tool bar icons in GTK3. Fix some GTK3 warnings. (diff)
downloadinkscape-28d4af68e5f0c3c157b97fd857ef676657b35e01.tar.gz
inkscape-28d4af68e5f0c3c157b97fd857ef676657b35e01.zip
Prevent scrollbar overlay from covering swatches in GTK3 build.
And some minor cleanup. (bzr r14871)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/glyphs.h2
-rw-r--r--src/ui/previewholder.cpp6
-rw-r--r--src/ui/previewholder.h1
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/panel.h4
5 files changed, 14 insertions, 3 deletions
diff --git a/src/ui/dialog/glyphs.h b/src/ui/dialog/glyphs.h
index 3d0571244..00c3ffa07 100644
--- a/src/ui/dialog/glyphs.h
+++ b/src/ui/dialog/glyphs.h
@@ -27,8 +27,6 @@ class font_instance;
namespace Inkscape {
namespace UI {
-class PreviewHolder;
-
namespace Dialog {
class GlyphColumns;
diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp
index 21f3f38d7..beb83f35c 100644
--- a/src/ui/previewholder.cpp
+++ b/src/ui/previewholder.cpp
@@ -340,6 +340,12 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int&
width = itemCount;
height = 1;
+#if GTK_CHECK_VERSION(3,16,0)
+ // Disable overlay scrolling as the scrollbar covers up swatches.
+ // For some reason this also makes the height 55px.
+ ((Gtk::ScrolledWindow *)_scroller)->set_overlay_scrolling(false);
+#endif
+
if ( _anchor == SP_ANCHOR_SOUTH || _anchor == SP_ANCHOR_NORTH ) {
Gtk::Requisition req;
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h
index f6d1985cc..28c0fd865 100644
--- a/src/ui/previewholder.h
+++ b/src/ui/previewholder.h
@@ -3,6 +3,7 @@
#define SEEN_PREVIEW_HOLDER_H
/*
* A simple interface for previewing representations.
+ * Used by Swatches
*
* Authors:
* Jon A. Cruz
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 8a1e98a63..5d4a25a68 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -73,6 +73,9 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
_action_area(0),
_fillable(0)
{
+#if WITH_GTKMM_3_0
+ set_orientation( Gtk::ORIENTATION_VERTICAL );
+#endif
_init();
}
@@ -92,7 +95,6 @@ void Panel::_popper(GdkEventButton* event)
void Panel::_init()
{
- Glib::ustring tmp("<");
_anchor = SP_ANCHOR_CENTER;
guint panel_size = 0, panel_mode = 0, panel_ratio = 100, panel_border = 0;
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index a90060e17..7b2836fe8 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -64,7 +64,11 @@ namespace Widget {
* @see UI::Dialog::DesktopTracker to handle desktop change, selection change and selected object modifications.
* @see UI::Dialog::DialogManager manages the dialogs within inkscape.
*/
+#if WITH_GTKMM_3_0
+class Panel : public Gtk::Box {
+#else
class Panel : public Gtk::VBox {
+#endif
public:
static void prep();