From 8e3d3512e7239f46bd153306853cb44c0e16c07e Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Mon, 23 Dec 2019 14:59:35 +0000 Subject: [PATCH] Enhancement #1857312: Please make the boxes in User categories editor the same size. Move the buttons cancel and OK to the right --- src/calibre/gui2/dialogs/tag_categories.py | 6 + src/calibre/gui2/dialogs/tag_categories.ui | 403 +++++++-------------- 2 files changed, 143 insertions(+), 266 deletions(-) diff --git a/src/calibre/gui2/dialogs/tag_categories.py b/src/calibre/gui2/dialogs/tag_categories.py index 43f975fe85..af3caeafdb 100644 --- a/src/calibre/gui2/dialogs/tag_categories.py +++ b/src/calibre/gui2/dialogs/tag_categories.py @@ -45,6 +45,12 @@ class TagCategories(QDialog, Ui_TagCategories): Ui_TagCategories.__init__(self) self.setupUi(self) + # I can't figure out how to get these into the .ui file + self.gridLayout_2.setColumnMinimumWidth(0, 50) + self.gridLayout_2.setColumnStretch(0, 1) + self.gridLayout_2.setColumnMinimumWidth(2, 50) + self.gridLayout_2.setColumnStretch(2, 1) + # Remove help icon on title bar icon = self.windowIcon() self.setWindowFlags(self.windowFlags()&(~Qt.WindowContextHelpButtonHint)) diff --git a/src/calibre/gui2/dialogs/tag_categories.ui b/src/calibre/gui2/dialogs/tag_categories.ui index abcc5cecc8..198a99d4b2 100644 --- a/src/calibre/gui2/dialogs/tag_categories.ui +++ b/src/calibre/gui2/dialogs/tag_categories.ui @@ -9,228 +9,163 @@ 628 482 - - + User categories editor :/images/chapters.png:/images/chapters.png - - - + + + - - - - 0 - 0 - - - - - 100 - 0 - - - - Category &name: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - category_box - - - - - - - - 160 - 0 - - - - - 145 - 0 - - - - Select a category to edit - - - false - - - - - - - &Category filter: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - category_filter_box - - - - - - - Select the content kind of the new category - - - - - - - - - - - Delete this selected tag category - - - ... - - - - :/images/trash.png:/images/trash.png - - - - - - - - - - 60 - 0 - + + + + + Category &name: + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + category_box + + + + + - Enter a category name, then use the add button or the rename button + Select a category to edit - - true + + false - - + + + + &Category filter: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + category_filter_box + + + + + - Add a new category + Select the content kind of the new category + + + + + + + + + + + Delete this selected tag category ... - :/images/plus.png:/images/plus.png + :/images/trash.png:/images/trash.png - - - - - - Rename the current category to what is in the box - - - ... - - - - :/images/edit-undo.png:/images/edit-undo.png - - - - - - - <p>Show items in the Available items box only if they appear in the - current virtual library. Applied items not in the VL will be marked - "not on any book".</p> - - - &Show only available items in current virtual library - - - - - - - - - - - + + + + + + Enter a category name, then use the add button or the rename button + + + true + + + + + + + Add a new category + + + ... + + + + :/images/plus.png:/images/plus.png + + + + + + + + + Rename the current category to what is in the box + - &Available items + ... - - available_items_box + + + :/images/edit-undo.png:/images/edit-undo.png - - - - Qt::Horizontal + + + + <p>Show items in the Available items box only if they appear in the + current virtual library. Applied items not in the VL will be marked + "not on any book".</p> - - - 40 - 20 - - - - - - - - - - - - true - - - QAbstractItemView::MultiSelection - - - QAbstractItemView::SelectRows + + &Show only available items in current virtual library - - - - - - - Qt::Vertical + + + + + + + &Available items - - - 20 - 40 - + + available_items_box - + - + + + + true + + + QAbstractItemView::MultiSelection + + + QAbstractItemView::SelectRows + + + + Apply tags to current tag category @@ -244,51 +179,17 @@ - - - - Qt::Vertical + + + + Applied &items - - - 20 - 40 - + + applied_items_box - + - - - - - - - - - - Applied &items - - - applied_items_box - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - + true @@ -298,24 +199,7 @@ - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + Unapply (remove) tag from current tag category @@ -329,34 +213,21 @@ - - + + - Qt::Vertical + Qt::Horizontal - - - 20 - 40 - + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - + + false + + - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - true - - -