Browse Source

Fix font errors and spacing in GTK 3.20+

master-code
Matt Baer 5 years ago
parent
commit
7a12af3c11
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/window.vala

+ 2
- 2
src/window.vala View File

@@ -190,7 +190,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
var styles = option.get_style_context();
var provider = new Gtk.CssProvider();
try {
provider.load_from_data("* {font: %s;}".printf(families));
provider.load_from_data("* {font-family: %s;}".printf(families));
styles.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
} catch (Error e) {
warning(e.message);
@@ -230,7 +230,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
Gtk.StyleContext.remove_provider_for_screen(Gdk.Screen.get_default(), cur_styles);

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


Loading…
Cancel
Save