mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
UI polishing
This commit is contained in:
parent
9d2d338840
commit
f7653accd1
@ -31,6 +31,9 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -38,6 +41,10 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Search</string>
|
<string>Search</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/search.png</normaloff>:/images/search.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -132,6 +139,8 @@
|
|||||||
<header>calibre/gui2/widgets.h</header>
|
<header>calibre/gui2/widgets.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../../../../../../resources/images.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>243</width>
|
<width>205</width>
|
||||||
<height>147</height>
|
<height>147</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -211,18 +211,18 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="configure">
|
<widget class="QToolButton" name="configure">
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="open_external">
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Open a selected book in the system's web browser</string>
|
<string>Configure Get books behavior</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open in &external browser</string>
|
<string>&Configure</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/config.png</normaloff>:/images/config.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -239,50 +239,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="open_external">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open a selected book in the system's web browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open in &external browser</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="3">
|
|
||||||
<layout class="QHBoxLayout" name="bottom_layout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Books:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="total">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="close">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -327,6 +299,48 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0" colspan="4">
|
||||||
|
<layout class="QHBoxLayout" name="bottom_layout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Books:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="total">
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="close">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Close</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/window-close.png</normaloff>:/images/window-close.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
@ -282,6 +282,7 @@ class FilesWidget(QWidget):
|
|||||||
self.filter_edit = e = QLineEdit(self)
|
self.filter_edit = e = QLineEdit(self)
|
||||||
l.addWidget(e)
|
l.addWidget(e)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = FilesModel(self)
|
self.model = m = FilesModel(self)
|
||||||
self.files = f = FilesView(m, self)
|
self.files = f = FilesView(m, self)
|
||||||
self.to_csv = f.to_csv
|
self.to_csv = f.to_csv
|
||||||
@ -471,6 +472,7 @@ class ImagesWidget(QWidget):
|
|||||||
self.filter_edit = e = QLineEdit(self)
|
self.filter_edit = e = QLineEdit(self)
|
||||||
l.addWidget(e)
|
l.addWidget(e)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = ImagesModel(self)
|
self.model = m = ImagesModel(self)
|
||||||
self.files = f = FilesView(m, self)
|
self.files = f = FilesView(m, self)
|
||||||
self.to_csv = f.to_csv
|
self.to_csv = f.to_csv
|
||||||
@ -591,6 +593,7 @@ class LinksWidget(QWidget):
|
|||||||
self.splitter = s = QSplitter(Qt.Vertical, self)
|
self.splitter = s = QSplitter(Qt.Vertical, self)
|
||||||
l.addWidget(s)
|
l.addWidget(s)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = LinksModel(self)
|
self.model = m = LinksModel(self)
|
||||||
self.links = f = FilesView(m, self)
|
self.links = f = FilesView(m, self)
|
||||||
f.DELETE_POSSIBLE = False
|
f.DELETE_POSSIBLE = False
|
||||||
@ -730,6 +733,7 @@ class WordsWidget(QWidget):
|
|||||||
self.filter_edit = e = QLineEdit(self)
|
self.filter_edit = e = QLineEdit(self)
|
||||||
l.addWidget(e)
|
l.addWidget(e)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = WordsModel(self)
|
self.model = m = WordsModel(self)
|
||||||
self.words = f = FilesView(m, self)
|
self.words = f = FilesView(m, self)
|
||||||
self.to_csv = f.to_csv
|
self.to_csv = f.to_csv
|
||||||
@ -818,6 +822,7 @@ class CharsWidget(QWidget):
|
|||||||
self.filter_edit = e = QLineEdit(self)
|
self.filter_edit = e = QLineEdit(self)
|
||||||
l.addWidget(e)
|
l.addWidget(e)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = CharsModel(self)
|
self.model = m = CharsModel(self)
|
||||||
self.chars = f = FilesView(m, self)
|
self.chars = f = FilesView(m, self)
|
||||||
self.to_csv = f.to_csv
|
self.to_csv = f.to_csv
|
||||||
@ -1023,6 +1028,7 @@ class CSSWidget(QWidget):
|
|||||||
self.filter_edit = e = QLineEdit(self)
|
self.filter_edit = e = QLineEdit(self)
|
||||||
l.addWidget(e)
|
l.addWidget(e)
|
||||||
e.setPlaceholderText(_('Filter'))
|
e.setPlaceholderText(_('Filter'))
|
||||||
|
e.setClearButtonEnabled(True)
|
||||||
self.model = m = self.MODEL(self)
|
self.model = m = self.MODEL(self)
|
||||||
self.proxy = p = self.PROXY(self)
|
self.proxy = p = self.PROXY(self)
|
||||||
p.setSourceModel(m)
|
p.setSourceModel(m)
|
||||||
|
@ -94,6 +94,7 @@ class HistoryBox(HistoryComboBox):
|
|||||||
self.disable_popup = tprefs['disable_completion_popup_for_search']
|
self.disable_popup = tprefs['disable_completion_popup_for_search']
|
||||||
self.clear_msg = clear_msg
|
self.clear_msg = clear_msg
|
||||||
self.ignore_snip_expansion = False
|
self.ignore_snip_expansion = False
|
||||||
|
self.lineEdit().setClearButtonEnabled(True)
|
||||||
|
|
||||||
def event(self, ev):
|
def event(self, ev):
|
||||||
if ev.type() in (ev.ShortcutOverride, ev.KeyPress) and ev.key() == KEY and ev.modifiers() & MODIFIER:
|
if ev.type() in (ev.ShortcutOverride, ev.KeyPress) and ev.key() == KEY and ev.modifiers() & MODIFIER:
|
||||||
@ -242,7 +243,8 @@ class SearchWidget(QWidget):
|
|||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QWidget.__init__(self, parent)
|
QWidget.__init__(self, parent)
|
||||||
self.l = l = QGridLayout(self)
|
self.l = l = QGridLayout(self)
|
||||||
l.setContentsMargins(0, 0, 0, 0)
|
left, top, right, bottom = l.getContentsMargins()
|
||||||
|
l.setContentsMargins(0, 0, right, 0)
|
||||||
|
|
||||||
self.fl = fl = QLabel(_('&Find:'))
|
self.fl = fl = QLabel(_('&Find:'))
|
||||||
fl.setAlignment(Qt.AlignRight | Qt.AlignCenter)
|
fl.setAlignment(Qt.AlignRight | Qt.AlignCenter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user