~nhoad/roland

0c8d03dc5d533e0b5dc0b4ea6237dd974efac88f — Nathan Hoad 7 years ago e6e8ccc
Fix styling now. This changed in Gtk 3.20.
2 files changed, 12 insertions(+), 4 deletions(-)

M example_config.py
M roland/core.py
M example_config.py => example_config.py +3 -2
@@ 26,6 26,7 @@ def contextual_follow(browser):
    else:
        browser.follow()


commands = {
    'i': lazy.set_mode(Mode.Insert),
    ':': lazy.prompt_command(),


@@ 127,12 128,12 @@ show_favicons = True

# CSS style to use for input/label widgets.
style = '''
    GtkNotebook, GtkTab, GtkEntry, GtkLabel {
    header, notebook, tab, entry, label {
        background: black;
        color: white;
    }

    .active-page GtkLabel
    .beanbags
    {
        color: #01a252;
    }

M roland/core.py => roland/core.py +9 -2
@@ 18,13 18,13 @@ from urllib import parse as urlparse

import logbook
import msgpack
import gi

from gi.repository import GObject, Gdk, Gio, Gtk, Pango, GLib, WebKit2, GdkPixbuf

from .api import Mode
from .utils import (
    cache_path, config_path, runtime_path, get_keyname, get_pretty_size, init_logging, load_config, RolandConfigBase)
    cache_path, config_path, runtime_path, get_keyname, get_pretty_size,
    init_logging, RolandConfigBase)


faulthandler.enable()


@@ 1551,6 1551,7 @@ class BrowserView(BrowserCommands):
                return clip.wait_for_text()
        return None


class MultiTabBrowserWindow(Gtk.Window):
    def __init__(self, roland, *args, **kwargs):
        super().__init__(*args, **kwargs)


@@ 1564,6 1565,12 @@ class MultiTabBrowserWindow(Gtk.Window):
    def on_switch_page(self, notebook, page, page_num):
        if page.lazy:
            page.start()

        for browser in self.roland.get_browsers():
            browser.tab_title.get_style_context().remove_class('active-page')

        page.tab_title.get_style_context().add_class('active-page')

        self.roland.window.set_title(page.get_title())

    def on_key_press_event(self, widget, event):