From 90de6433b60a1bbd06fd5317d53ea671bee11f6d Mon Sep 17 00:00:00 2001 From: beville Date: Thu, 31 Jan 2013 05:12:12 +0000 Subject: [PATCH] GUI goodness, better adjusted forms and dialogs git-svn-id: http://comictagger.googlecode.com/svn/trunk@383 6c5673fe-1810-88d6-992b-cd32ca31540c --- autotagstartwindow.ui | 74 ++++++++++++++++++++++++++++++++++++++++--- exportwindow.ui | 14 +++++--- taggerwindow.py | 28 ++++++++++------ taggerwindow.ui | 6 ++-- 4 files changed, 101 insertions(+), 21 deletions(-) diff --git a/autotagstartwindow.ui b/autotagstartwindow.ui index 953a00b..2ddb8e9 100644 --- a/autotagstartwindow.ui +++ b/autotagstartwindow.ui @@ -9,10 +9,16 @@ 0 0 - 602 - 412 + 607 + 319 + + + 0 + 0 + + Auto-Tag @@ -40,13 +46,16 @@ + + QLayout::SetFixedSize + QFormLayout::AllNonFixedFieldsGrow - + 0 0 @@ -58,6 +67,12 @@ + + + 0 + 0 + + Don't use publication year in indentification process @@ -65,6 +80,12 @@ + + + 0 + 0 + + If no issue number, assume "1" @@ -72,6 +93,12 @@ + + + 0 + 0 + + Ignore leading (sequence) numbers in filename @@ -79,6 +106,12 @@ + + + 0 + 0 + + Remove archives from list after successful tagging @@ -86,6 +119,12 @@ + + + 0 + 0 + + Specify series search string for all selected archives @@ -93,6 +132,12 @@ + + + 0 + 0 + + 40 @@ -100,15 +145,28 @@ - + - + + + + 0 + 0 + + + + + + 0 + 0 + + 50 @@ -119,6 +177,12 @@ + + + 0 + 0 + + Adjust Name Length Match Tolerance: diff --git a/exportwindow.ui b/exportwindow.ui index 647babd..50940f7 100644 --- a/exportwindow.ui +++ b/exportwindow.ui @@ -9,18 +9,24 @@ 0 0 - 515 - 320 + 533 + 202 + + + 0 + 0 + + Export to Zip Archive false - - + + diff --git a/taggerwindow.py b/taggerwindow.py index e6a6ada..3a3ccae 100644 --- a/taggerwindow.py +++ b/taggerwindow.py @@ -123,13 +123,6 @@ class TaggerWindow( QtGui.QMainWindow): #self.splitter.setHandleWidth(0) #self.splitter.handle(1).setDisabled(True) - # This is ugly, and should probably be done in a resource file - if platform.system() == "Linux": - self.scrollAreaWidgetContents.resize( self.scrollAreaWidgetContents.width(), 630) - #if platform.system() == "Darwin": - # self.scrollAreaWidgetContents.resize( 550, self.scrollAreaWidgetContents.height()) - - # we can't specify relative font sizes in the UI designer, so # walk through all the lablels in the main form, and make them # a smidge smaller @@ -141,8 +134,8 @@ class TaggerWindow( QtGui.QMainWindow): f.setItalic( True ) child.setFont( f ) - #--------------------------- + self.scrollAreaWidgetContents.adjustSize() self.setWindowIcon(QtGui.QIcon(os.path.join(ComicTaggerSettings.baseDir(), 'graphics/app.png' ))) @@ -202,6 +195,9 @@ class TaggerWindow( QtGui.QMainWindow): self.splitter.setSizes([ self.settings.last_form_side_width , self.settings.last_list_side_width]) self.raise_() QtCore.QCoreApplication.processEvents() + self.resizeEvent( None ) + + self.splitter.splitterMoved.connect( self.splitterMovedEvent ) self.fileSelectionList.addAppAction( self.actionAutoIdentify ) self.fileSelectionList.addAppAction( self.actionAutoTag ) @@ -391,6 +387,7 @@ class TaggerWindow( QtGui.QMainWindow): if rar_count != 0: dlg = ExportWindow( self, self.settings, self.tr("You have selected {0} archive(s) to export to Zip format. New archives will be created in the same folder as the original.\n\nPlease choose options below, and select OK.\n".format(rar_count) )) + dlg.adjustSize( ) dlg.setModal( True ) if not dlg.exec_(): return @@ -1661,6 +1658,7 @@ class TaggerWindow( QtGui.QMainWindow): atstartdlg = AutoTagStartWindow( self, self.settings, self.tr("You have selected {0} archive(s) to automatically identify and write {1} tags to.\n\n".format(len(ca_list), MetaDataStyle.name[style]) + "Please choose options below, and select OK to Auto-Tag.\n" )) + atstartdlg.adjustSize( ) atstartdlg.setModal( True ) if not atstartdlg.exec_(): return @@ -1856,4 +1854,16 @@ class TaggerWindow( QtGui.QMainWindow): self.actualLoadCurrentArchive() def fileListCleared( self ): - self.resetApp() \ No newline at end of file + self.resetApp() + + def splitterMovedEvent( self, w1, w2 ): + scrollbar_w = 0 + if self.scrollArea.verticalScrollBar().isVisible(): + scrollbar_w = self.scrollArea.verticalScrollBar().width() + + new_w = self.scrollArea.width() - scrollbar_w - 3 + self.scrollAreaWidgetContents.resize( new_w, self.scrollAreaWidgetContents.height()) + + def resizeEvent( self, ev ): + self.splitterMovedEvent( 0, 0) + diff --git a/taggerwindow.ui b/taggerwindow.ui index 0ff6a54..57df51f 100644 --- a/taggerwindow.ui +++ b/taggerwindow.ui @@ -301,13 +301,13 @@ 0 - -64 + 0 470 520 - + 0 0 @@ -1107,7 +1107,7 @@ 0 0 1096 - 25 + 21