diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2014-09-16 23:06:36 +0200 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2014-09-16 23:06:36 +0200 |
commit | 80c8cdb2ae8e873eceb4039b071ef82379744984 (patch) | |
tree | e122060d1a0fcf0ed865997e104bd30aa034d2bd | |
parent | 8c273ad0ca589c09d20a85ebbc1e1852400d6393 (diff) | |
download | scintilla-mirror-80c8cdb2ae8e873eceb4039b071ef82379744984.tar.gz |
GTK: Don't hardcode auto-completion popup frame border width
-rw-r--r-- | gtk/PlatGTK.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 78776dfa9..28ad37140 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1695,11 +1695,13 @@ PRectangle ListBoxX::GetDesiredRect() { int row_height = GetRowHeight(); #if GTK_CHECK_VERSION(3,0,0) GtkStyleContext *styleContextFrame = gtk_widget_get_style_context(PWidget(frame)); - GtkBorder padding; + GtkBorder padding, border; gtk_style_context_get_padding(styleContextFrame, GTK_STATE_FLAG_NORMAL, &padding); + gtk_style_context_get_border(styleContextFrame, GTK_STATE_FLAG_NORMAL, &border); height = (rows * row_height + padding.top + padding.bottom - + 2 * (gtk_container_get_border_width(GTK_CONTAINER(PWidget(list))) + 1)); + + border.top + border.bottom + + 2 * gtk_container_get_border_width(GTK_CONTAINER(PWidget(list)))); #else height = (rows * row_height + 2 * (PWidget(frame)->style->ythickness @@ -1718,7 +1720,8 @@ PRectangle ListBoxX::GetDesiredRect() { rc.right += horizontal_separator; #if GTK_CHECK_VERSION(3,0,0) rc.right += (padding.left + padding.right - + 2 * (gtk_container_get_border_width(GTK_CONTAINER(PWidget(list))) + 1)); + + border.left + border.right + + 2 * gtk_container_get_border_width(GTK_CONTAINER(PWidget(list)))); #else rc.right += 2 * (PWidget(frame)->style->xthickness + GTK_CONTAINER(PWidget(list))->border_width); |