aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-09-24 11:59:53 +0000
committernyamatongwe <devnull@localhost>2003-09-24 11:59:53 +0000
commit9ddeed309e250837d9c2c65edb6406503ac9c5a8 (patch)
tree7556c19b9083e8982585ac78ab46ddbc0fae5bd7
parente5c0139afd49b33aececc7d27de8f69274c2593e (diff)
downloadscintilla-mirror-9ddeed309e250837d9c2c65edb6406503ac9c5a8.tar.gz
Patch from Naba to set font on autocompletion correctly.
Added a couple of pixels height to fit even number of rows.
-rw-r--r--gtk/PlatGTK.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 510d8551c..a3c8b4b15 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1891,9 +1891,9 @@ void ListBoxX::SetFont(Font &scint_font) {
gtk_style_unref(style);
}
#else
- GtkStyle *styleCurrent = gtk_widget_get_style(GTK_WIDGET(PWidget(list)));
if (PFont(scint_font)->pfont) {
// Current font is GDK font
+ GtkStyle *styleCurrent = gtk_widget_get_style(GTK_WIDGET(PWidget(list)));
GdkFont *fontCurrent = gtk_style_get_font(styleCurrent);
if (!gdk_font_equal(fontCurrent, PFont(scint_font)->pfont)) {
GtkStyle *styleNew = gtk_style_copy(styleCurrent);
@@ -1903,11 +1903,7 @@ void ListBoxX::SetFont(Font &scint_font) {
}
} else if (PFont(scint_font)->pfd) {
// Current font is Pango font
- GtkStyle *styleNew = gtk_style_copy(styleCurrent);
- pango_font_description_free(styleNew->font_desc);
- styleNew->font_desc = pango_font_description_copy(PFont(scint_font)->pfd);
- gtk_widget_set_style(GTK_WIDGET(PWidget(list)), styleNew);
- gtk_style_unref(styleCurrent);
+ gtk_widget_modify_font(PWidget(list), PFont(scint_font)->pfd);
}
#endif
}
@@ -1950,7 +1946,7 @@ PRectangle ListBoxX::GetDesiredRect() {
int ythickness = PWidget(list)->style->ythickness;
height = (rows * row_height
+ 2 * (ythickness
- + GTK_CONTAINER(PWidget(list))->border_width));
+ + GTK_CONTAINER(PWidget(list))->border_width + 1));
#endif
gtk_widget_set_usize(GTK_WIDGET(PWidget(list)), -1, height);