parent
f31f254d9b
commit
63dae3a885
@ -153,7 +153,7 @@ def qute_help(win_id, request):
|
||||
"""Handler for qute:help. Return HTML content as bytes."""
|
||||
try:
|
||||
utils.read_file('html/doc/index.html')
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, NotADirectoryError, OSError, BlockingIOError):
|
||||
html = jinja.env.get_template('error.html').render(
|
||||
title="Error while loading documentation",
|
||||
url=request.url().toDisplayString(),
|
||||
|
@ -108,9 +108,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
self._undo_stack = []
|
||||
self._filter = signalfilter.SignalFilter(win_id, self)
|
||||
self._now_focused = None
|
||||
# FIXME adjust this to font size
|
||||
# https://github.com/The-Compiler/qutebrowser/issues/119
|
||||
self.setIconSize(QSize(12, 12))
|
||||
objreg.get('config').changed.connect(self.update_favicons)
|
||||
objreg.get('config').changed.connect(self.update_window_title)
|
||||
objreg.get('config').changed.connect(self.update_tab_titles)
|
||||
|
@ -24,7 +24,7 @@ Module attributes:
|
||||
between items.
|
||||
"""
|
||||
|
||||
import functools
|
||||
import functools, math
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QSize, QRect, QPoint, QTimer
|
||||
from PyQt5.QtWidgets import (QTabWidget, QTabBar, QSizePolicy, QCommonStyle,
|
||||
@ -296,6 +296,12 @@ class TabBar(QTabBar):
|
||||
"""Set the tab bar font."""
|
||||
self.setFont(config.get('fonts', 'tabbar'))
|
||||
|
||||
def resizeEvent(self, s):
|
||||
height = self.size().height()
|
||||
if height > 0:
|
||||
height = math.ceil(height - height / 7)
|
||||
self.setIconSize(QSize(height, height))
|
||||
|
||||
@config.change_filter('colors', 'tabs.bg.bar')
|
||||
def set_colors(self):
|
||||
"""Set the tab bar colors."""
|
||||
|
Loading…
Reference in New Issue
Block a user