Merge branch 'daniel-lawrence-lu-master'
This commit is contained in:
commit
6a4785ec3a
@ -41,6 +41,12 @@ Fixed
|
||||
|
||||
- Fixed displaying of web history if `web-history-max-items` is set to -1.
|
||||
|
||||
Removed
|
||||
~~~~~~~
|
||||
|
||||
- The `colors -> tabs.bg.bar` setting got removed as the tab size is now
|
||||
adjusted so the bar is never visible.
|
||||
|
||||
v0.4.1
|
||||
------
|
||||
|
||||
|
@ -179,6 +179,7 @@ Contributors, sorted by the number of commits in descending order:
|
||||
* HalosGhost
|
||||
* Gregor Pohl
|
||||
* Eivind Uggedal
|
||||
* Daniel Lu
|
||||
* Arseniy Seroka
|
||||
* Andy Balaam
|
||||
* Andreas Fischer
|
||||
|
@ -225,7 +225,6 @@
|
||||
|<<colors-tabs.bg.selected.odd,tabs.bg.selected.odd>>|Background color of selected odd tabs.
|
||||
|<<colors-tabs.fg.selected.even,tabs.fg.selected.even>>|Foreground color of selected even tabs.
|
||||
|<<colors-tabs.bg.selected.even,tabs.bg.selected.even>>|Background color of selected even tabs.
|
||||
|<<colors-tabs.bg.bar,tabs.bg.bar>>|Background color of the tab bar.
|
||||
|<<colors-tabs.indicator.start,tabs.indicator.start>>|Color gradient start for the tab indicator.
|
||||
|<<colors-tabs.indicator.stop,tabs.indicator.stop>>|Color gradient end for the tab indicator.
|
||||
|<<colors-tabs.indicator.error,tabs.indicator.error>>|Color for the tab indicator on errors..
|
||||
@ -1820,12 +1819,6 @@ Background color of selected even tabs.
|
||||
|
||||
Default: +pass:[${tabs.bg.selected.odd}]+
|
||||
|
||||
[[colors-tabs.bg.bar]]
|
||||
=== tabs.bg.bar
|
||||
Background color of the tab bar.
|
||||
|
||||
Default: +pass:[#555555]+
|
||||
|
||||
[[colors-tabs.indicator.start]]
|
||||
=== tabs.indicator.start
|
||||
Color gradient start for the tab indicator.
|
||||
|
@ -333,7 +333,6 @@ class ConfigManager(QObject):
|
||||
('colors', 'tab.bg.even'): 'tabs.bg.even',
|
||||
('colors', 'tab.bg.selected'): 'tabs.bg.selected.odd',
|
||||
('colors', 'tabs.bg.selected'): 'tabs.bg.selected.odd',
|
||||
('colors', 'tab.bg.bar'): 'tabs.bg.bar',
|
||||
('colors', 'tab.indicator.start'): 'tabs.indicator.start',
|
||||
('colors', 'tab.indicator.stop'): 'tabs.indicator.stop',
|
||||
('colors', 'tab.indicator.error'): 'tabs.indicator.error',
|
||||
@ -349,6 +348,8 @@ class ConfigManager(QObject):
|
||||
('tabs', 'indicator-space'),
|
||||
('tabs', 'hide-auto'),
|
||||
('tabs', 'hide-always'),
|
||||
('colors', 'tab.bg.bar'),
|
||||
('colors', 'tabs.bg.bar'),
|
||||
]
|
||||
CHANGED_OPTIONS = {
|
||||
('content', 'cookies-accept'):
|
||||
|
@ -992,10 +992,6 @@ def data(readonly=False):
|
||||
SettingValue(typ.QtColor(), '${tabs.bg.selected.odd}'),
|
||||
"Background color of selected even tabs."),
|
||||
|
||||
('tabs.bg.bar',
|
||||
SettingValue(typ.QtColor(), '#555555'),
|
||||
"Background color of the tab bar."),
|
||||
|
||||
('tabs.indicator.start',
|
||||
SettingValue(typ.QtColor(), '#0000aa'),
|
||||
"Color gradient start for the tab indicator."),
|
||||
|
@ -235,8 +235,6 @@ class TabBar(QTabBar):
|
||||
config.get('tabs', 'show-switching-delay'))
|
||||
self._auto_hide_timer.timeout.connect(self._tabhide)
|
||||
self.setAutoFillBackground(True)
|
||||
self.set_colors()
|
||||
config_obj.changed.connect(self.set_colors)
|
||||
QTimer.singleShot(0, self._tabhide)
|
||||
config_obj.changed.connect(self.on_tab_colors_changed)
|
||||
config_obj.changed.connect(self.on_show_switching_delay_changed)
|
||||
@ -320,13 +318,6 @@ class TabBar(QTabBar):
|
||||
size = self.fontMetrics().height() - 2
|
||||
self.setIconSize(QSize(size, size))
|
||||
|
||||
@config.change_filter('colors', 'tabs.bg.bar')
|
||||
def set_colors(self):
|
||||
"""Set the tab bar colors."""
|
||||
p = self.palette()
|
||||
p.setColor(QPalette.Window, config.get('colors', 'tabs.bg.bar'))
|
||||
self.setPalette(p)
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def on_tab_colors_changed(self, section, option):
|
||||
"""Set the tab colors."""
|
||||
@ -407,7 +398,12 @@ class TabBar(QTabBar):
|
||||
else:
|
||||
# If we *do* have enough space, tabs should occupy the whole window
|
||||
# width.
|
||||
size = QSize(self.width() / self.count(), height)
|
||||
width = self.width() / self.count()
|
||||
# If width is not divisible by count, add a pixel to some tabs so
|
||||
# that there is no ugly leftover space.
|
||||
if index < self.width() % self.count():
|
||||
width += 1
|
||||
size = QSize(width, height)
|
||||
qtutils.ensure_valid(size)
|
||||
return size
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user