Skip to content

Commit 7a12af3

Browse files
committed
Fix font errors and spacing in GTK 3.20+
1 parent f0d601f commit 7a12af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/window.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
190190
var styles = option.get_style_context();
191191
var provider = new Gtk.CssProvider();
192192
try {
193-
provider.load_from_data("* {font: %s;}".printf(families));
193+
provider.load_from_data("* {font-family: %s;}".printf(families));
194194
styles.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
195195
} catch (Error e) {
196196
warning(e.message);
@@ -230,7 +230,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
230230
Gtk.StyleContext.remove_provider_for_screen(Gdk.Screen.get_default(), cur_styles);
231231

232232
var padding = canvas.get_allocated_width()*0.10;
233-
var css = ("GtkTextView {font: %s; font-size: %dpx; padding: 20px;" +
233+
var css = ("textview {font-family: %s; font-size: %dpx; padding: 20px;" +
234234
" padding-left: %ipx; padding-right: %ipx;" +
235235
" -GtkWidget-cursor-color: #5ac4ee;}").printf(font, font_size,
236236
(int) padding, (int) padding);

0 commit comments

Comments
 (0)