From 1b41e68f05b19c921d6cb243a72d57754f3041fe Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Jun 2017 18:06:40 +1000 Subject: [PATCH] remove gradients from toolbars in favour of system colour --- aqt/toolbar.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/aqt/toolbar.py b/aqt/toolbar.py index ec065000c..ea2ea38b4 100644 --- a/aqt/toolbar.py +++ b/aqt/toolbar.py @@ -29,12 +29,13 @@ class Toolbar: def draw(self): self.web.onBridgeCmd = self._linkHandler self.web.onLoadFinished = self.onLoaded + bgcol = QApplication.instance().palette().window().color().name() self.web.stdHtml(self._body % ( # may want a context menu here in the future ' '*20, self._centerLinks(), self._rightIcons()), - self._css) + self._css % bgcol) # Available links ###################################################################### @@ -122,8 +123,7 @@ class Toolbar: padding:3px; font-weight: bold; border-bottom: 1px solid #aaa; -background: -webkit-gradient(linear, left top, left bottom, - from(#ddd), to(#fff)); +background: %s; } body { @@ -149,8 +149,6 @@ class BottomBar(Toolbar): _css = Toolbar._css + """ #header { -background: -webkit-gradient(linear, left top, left bottom, -from(#fff), to(#ddd)); border-bottom: 0; border-top: 1px solid #aaa; margin-bottom: 6px; @@ -166,6 +164,7 @@ margin-top: 0; def draw(self, buf): self.web.onBridgeCmd = self._linkHandler self.web.onLoadFinished = self.onLoaded + bgcol = QApplication.instance().palette().window().color().name() self.web.stdHtml( self._centerBody % buf, - self._css) + self._css % bgcol)