From d088f888d08121e7e2279ba3b68f0658d14c783e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 10 Jun 2012 11:03:58 +0530 Subject: [PATCH] Remove the bright yellow lines indicating hidden sections as they dont seem to communicate that very well to most users. We will just have to rely on the buttons in the bottom right corner to indicate sections are hidden. --- resources/default_tweaks.py | 6 ------ src/calibre/gui2/init.py | 3 ++- src/calibre/gui2/widgets.py | 9 +-------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 92323d0f0f..9f848dc5ce 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -442,12 +442,6 @@ metadata_edit_custom_column_order = [] # calibre. public_smtp_relay_delay = 301 -#: Remove the bright yellow lines at the edges of the book list -# Control whether the bright yellow lines at the edges of book list are drawn -# when a section of the user interface is hidden. Changes will take effect -# after a restart of calibre. -draw_hidden_section_indicators = True - #: The maximum width and height for covers saved in the calibre library # All covers in the calibre library will be resized, preserving aspect ratio, # to fit within this size. This is to prevent slowdowns caused by extremely diff --git a/src/calibre/gui2/init.py b/src/calibre/gui2/init.py index 95e8c79382..d6332d71ac 100644 --- a/src/calibre/gui2/init.py +++ b/src/calibre/gui2/init.py @@ -238,10 +238,11 @@ class LayoutMixin(object): # {{{ # }}} self.status_bar = StatusBar(self) + stylename = unicode(self.style().objectName()) for x in button_order: button = getattr(self, x+'_splitter').button button.setIconSize(QSize(24, 24)) - if isosx: + if isosx and stylename != u'Calibre': button.setStyleSheet(''' QToolButton { background: none; border:none; padding: 0px; } QToolButton:checked { background: rgba(0, 0, 0, 25%); } diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index c9a3061295..4332bb651b 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -21,7 +21,7 @@ from calibre.gui2 import (NONE, error_dialog, pixmap_to_data, gprefs, from calibre.gui2.filename_pattern_ui import Ui_Form from calibre import fit_image from calibre.ebooks import BOOK_EXTENSIONS -from calibre.utils.config import prefs, XMLConfig, tweaks +from calibre.utils.config import prefs, XMLConfig from calibre.gui2.progress_indicator import ProgressIndicator as _ProgressIndicator from calibre.gui2.dnd import (dnd_has_image, dnd_get_image, dnd_get_files, IMAGE_EXTENSIONS, dnd_has_extension, DownloadDialog) @@ -1000,13 +1000,6 @@ class SplitterHandle(QSplitterHandle): if oh != self.highlight: self.update() - def paintEvent(self, ev): - QSplitterHandle.paintEvent(self, ev) - if self.highlight and tweaks['draw_hidden_section_indicators']: - painter = QPainter(self) - painter.setClipRect(ev.rect()) - painter.fillRect(self.rect(), Qt.yellow) - def mouseDoubleClickEvent(self, ev): self.double_clicked.emit(self)