Font tweaks

git-svn-id: http://comictagger.googlecode.com/svn/trunk@421 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville 2013-02-05 04:49:44 +00:00
parent 5b5842a5f8
commit dde1913e07
16 changed files with 46 additions and 84 deletions

View File

@ -29,6 +29,7 @@ from settings import ComicTaggerSettings
from options import MetaDataStyle
from coverimagewidget import CoverImageWidget
from comicvinetalker import ComicVineTalker
import utils
class AutoTagMatchWindow(QtGui.QDialog):
@ -49,6 +50,8 @@ class AutoTagMatchWindow(QtGui.QDialog):
gridlayout.addWidget( self.archiveCoverWidget )
gridlayout.setContentsMargins(0,0,0,0)
utils.reduceWidgetFontSize( self.twList )
self.setWindowFlags(self.windowFlags() |
QtCore.Qt.WindowSystemMenuHint |
QtCore.Qt.WindowMaximizeButtonHint)

View File

@ -39,11 +39,6 @@
</item>
<item>
<widget class="QTableWidget" name="twList">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>

View File

@ -22,7 +22,7 @@ import sys
from PyQt4 import QtCore, QtGui, uic
import os
from settings import ComicTaggerSettings
import utils
class AutoTagProgressWindow(QtGui.QDialog):
@ -39,12 +39,7 @@ class AutoTagProgressWindow(QtGui.QDialog):
QtCore.Qt.WindowSystemMenuHint |
QtCore.Qt.WindowMaximizeButtonHint)
# we can't specify relative font sizes in the UI designer, so
# make font for scroll window a smidge smaller
f = self.textEdit.font()
if f.pointSize() > 10:
f.setPointSize( f.pointSize() - 2 )
self.textEdit.setFont( f )
utils.reduceWidgetFontSize( self.textEdit )
def setArchiveImage( self, img_data):
self.setCoverImage( img_data, self.lblArchive )

View File

@ -31,6 +31,7 @@ from comicvinetalker import ComicVineTalker, ComicVineTalkerException
from imagefetcher import ImageFetcher
from pageloader import PageLoader
from imagepopup import ImagePopup
import utils
# helper func to allow a label to be clickable
def clickable(widget):
@ -64,10 +65,7 @@ class CoverImageWidget(QWidget):
uic.loadUi(os.path.join(ComicTaggerSettings.baseDir(), 'coverimagewidget.ui' ), self )
f = self.label.font()
if f.pointSize() > 10:
f.setPointSize( f.pointSize() - 2 )
self.label.setFont( f )
utils.reduceWidgetFontSize( self.label )
self.mode = mode
self.comicVine = ComicVineTalker()
@ -202,12 +200,9 @@ class CoverImageWidget(QWidget):
if self.imageIndex == -1 or self.imageCount == 1:
self.label.setText("")
elif self.mode == CoverImageWidget.AltCoverMode:
if self.imageIndex == 0:
self.label.setText("Primary Cover")
else:
self.label.setText("Alt. Cover {0}".format(self.imageIndex))
self.label.setText("Cover {0} ( of {1} )".format(self.imageIndex+1, self.imageCount))
else:
self.label.setText("Page {0}".format(self.imageIndex+1))
self.label.setText("Page {0} ( of {1} )".format(self.imageIndex+1, self.imageCount))
def loadURL( self ):
self.loadDefault()

View File

@ -31,6 +31,7 @@ from settings import ComicTaggerSettings
from comicarchive import ComicArchive
from genericmetadata import GenericMetadata, PageType
from options import MetaDataStyle
import utils
class FileTableWidget( QTableWidget ):
@ -74,12 +75,7 @@ class FileSelectionList(QWidget):
self.settings = settings
# we can't specify relative font sizes in the UI designer, so
# make font a smidge smaller
f = self.twList.font()
if f.pointSize() > 10:
f.setPointSize( f.pointSize() - 2 )
self.twList.setFont( f )
utils.reduceWidgetFontSize( self.twList )
self.twList.currentItemChanged.connect( self.currentItemChangedCB )

View File

@ -30,6 +30,7 @@ from imagefetcher import ImageFetcher
from settings import ComicTaggerSettings
from issuestring import IssueString
from coverimagewidget import CoverImageWidget
import utils
class IssueSelectionWindow(QtGui.QDialog):
@ -45,6 +46,8 @@ class IssueSelectionWindow(QtGui.QDialog):
gridlayout.addWidget( self.coverWidget )
gridlayout.setContentsMargins(0,0,0,0)
utils.reduceWidgetFontSize( self.twList )
self.setWindowFlags(self.windowFlags() |
QtCore.Qt.WindowSystemMenuHint |
QtCore.Qt.WindowMaximizeButtonHint)

View File

@ -20,11 +20,6 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTableWidget" name="twList">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>

View File

@ -29,6 +29,7 @@ from settings import ComicTaggerSettings
from options import MetaDataStyle
from coverimagewidget import CoverImageWidget
from comicvinetalker import ComicVineTalker
import utils
class MatchSelectionWindow(QtGui.QDialog):
@ -49,6 +50,8 @@ class MatchSelectionWindow(QtGui.QDialog):
gridlayout.addWidget( self.archiveCoverWidget )
gridlayout.setContentsMargins(0,0,0,0)
utils.reduceWidgetFontSize( self.twList )
self.setWindowFlags(self.windowFlags() |
QtCore.Qt.WindowSystemMenuHint |
QtCore.Qt.WindowMaximizeButtonHint)

View File

@ -39,11 +39,6 @@
</item>
<item>
<widget class="QTableWidget" name="twList">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>

View File

@ -22,7 +22,7 @@ import sys
from PyQt4 import QtCore, QtGui, uic
import os
from settings import ComicTaggerSettings
import utils
class IDProgressWindow(QtGui.QDialog):
@ -36,12 +36,7 @@ class IDProgressWindow(QtGui.QDialog):
QtCore.Qt.WindowSystemMenuHint |
QtCore.Qt.WindowMaximizeButtonHint)
# we can't specify relative font sizes in the UI designer, so
# make font for scroll window a smidge smaller
f = self.textEdit.font()
if f.pointSize() > 10:
f.setPointSize( f.pointSize() - 2 )
self.textEdit.setFont( f )
utils.reduceWidgetFontSize( self.textEdit )

View File

@ -1,6 +1,6 @@
# coding=utf-8
"""
The main window of the comictagger app
The main window of the ComicTagger app
"""
"""
@ -76,28 +76,6 @@ class MultipleMatch():
# this reads the environment and inits the right locale
locale.setlocale(locale.LC_ALL, "")
# helper func to allow a label to be clickable
def clickable(widget):
class Filter(QtCore.QObject):
dblclicked = pyqtSignal()
def eventFilter(self, obj, event):
if obj == widget:
if event.type() == QtCore.QEvent.MouseButtonDblClick:
self.dblclicked.emit()
return True
return False
filter = Filter(widget)
widget.installEventFilter(filter)
return filter.dblclicked
class TaggerWindow( QtGui.QMainWindow):
appName = "ComicTagger"
@ -141,7 +119,6 @@ class TaggerWindow( QtGui.QMainWindow):
f.setPointSize( f.pointSize() - 2 )
f.setItalic( True )
child.setFont( f )
self.scrollAreaWidgetContents.adjustSize()

View File

@ -211,14 +211,14 @@
</property>
<property name="minimumSize">
<size>
<width>220</width>
<height>330</height>
<width>230</width>
<height>380</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>220</width>
<height>330</height>
<width>230</width>
<height>380</height>
</size>
</property>
</widget>
@ -1092,7 +1092,7 @@
<x>0</x>
<y>0</y>
<width>1096</width>
<height>28</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuComicTagger">

View File

@ -12,6 +12,7 @@ Docs:
Look into using libarchive
Page left and right icons
-----------------------------------------------------
Bugs
@ -26,7 +27,8 @@ Big Future Features
GCD scraper or DB reader
Form Mode: Single vs Batch
Batch Edit
Form Mode: Single vs Batch
-----------------------------------------------------
Small(er) Future Feature

View File

@ -520,3 +520,17 @@ def getLanguageFromISO( iso ):
else:
return lang_dict[ iso ]
try:
from PyQt4 import QtGui
qt_available = True
except ImportError:
qt_available = False
if qt_available:
def reduceWidgetFontSize( widget , delta = 2):
f = widget.font()
if f.pointSize() > 10:
f.setPointSize( f.pointSize() - delta )
widget.setFont( f )

View File

@ -35,6 +35,7 @@ from progresswindow import IDProgressWindow
from settings import ComicTaggerSettings
from matchselectionwindow import MatchSelectionWindow
from coverimagewidget import CoverImageWidget
import utils
class SearchThread( QtCore.QThread):
@ -95,6 +96,9 @@ class VolumeSelectionWindow(QtGui.QDialog):
gridlayout = QtGui.QGridLayout( self.imageContainer )
gridlayout.addWidget( self.imageWidget )
gridlayout.setContentsMargins(0,0,0,0)
utils.reduceWidgetFontSize( self.teDetails, 1 )
utils.reduceWidgetFontSize( self.twList )
self.setWindowFlags(self.windowFlags() |
QtCore.Qt.WindowSystemMenuHint |

View File

@ -55,11 +55,6 @@
<height>250</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
@ -118,11 +113,6 @@
<height>200</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>