Remove reduce_widget_font_size

This commit is contained in:
Timmy Welch 2024-05-21 20:32:01 -07:00
parent 215a4680f4
commit 5010ca60e9
10 changed files with 5 additions and 44 deletions

View File

@ -28,7 +28,6 @@ from comictaggerlib.coverimagewidget import CoverImageWidget
from comictaggerlib.ctsettings import ct_ns
from comictaggerlib.resulttypes import IssueResult, Result
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import reduce_widget_font_size
from comictalker.comictalker import ComicTalker, TalkerError
logger = logging.getLogger(__name__)
@ -65,9 +64,6 @@ class AutoTagMatchWindow(QtWidgets.QDialog):
gridlayout.addWidget(self.archiveCoverWidget)
gridlayout.setContentsMargins(0, 0, 0, 0)
reduce_widget_font_size(self.twList)
reduce_widget_font_size(self.teDescription, 1)
self.setWindowFlags(
QtCore.Qt.WindowType(
self.windowFlags()

View File

@ -22,7 +22,6 @@ from PyQt5 import QtCore, QtWidgets, uic
from comictaggerlib.coverimagewidget import CoverImageWidget
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import reduce_widget_font_size
from comictalker.comictalker import ComicTalker
logger = logging.getLogger(__name__)
@ -59,8 +58,6 @@ class AutoTagProgressWindow(QtWidgets.QDialog):
)
)
reduce_widget_font_size(self.textEdit)
def set_archive_image(self, img_data: bytes) -> None:
self.set_cover_image(img_data, self.archiveCoverWidget)

View File

@ -31,7 +31,7 @@ from comictaggerlib.imagefetcher import ImageFetcher
from comictaggerlib.imagepopup import ImagePopup
from comictaggerlib.pageloader import PageLoader
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import get_qimage_from_data, reduce_widget_font_size
from comictaggerlib.ui.qtutils import get_qimage_from_data
from comictalker.comictalker import ComicTalker
logger = logging.getLogger(__name__)
@ -82,8 +82,6 @@ class CoverImageWidget(QtWidgets.QWidget):
with (ui_path / "coverimagewidget.ui").open(encoding="utf-8") as uifile:
uic.loadUi(uifile, self)
reduce_widget_font_size(self.label)
self.cache_folder = cache_folder
self.mode: int = mode
self.page_loader: PageLoader | None = None

View File

@ -30,7 +30,7 @@ from comictaggerlib.graphics import graphics_path
from comictaggerlib.optionalmsgdialog import OptionalMessageDialog
from comictaggerlib.settingswindow import linuxRarHelp, macRarHelp, windowsRarHelp
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import center_window_on_parent, reduce_widget_font_size
from comictaggerlib.ui.qtutils import center_window_on_parent
logger = logging.getLogger(__name__)
@ -56,8 +56,6 @@ class FileSelectionList(QtWidgets.QWidget):
self.config = config
reduce_widget_font_size(self.twList)
self.twList.horizontalHeader().setMinimumSectionSize(50)
self.twList.currentItemChanged.connect(self.current_item_changed_cb)

View File

@ -25,7 +25,7 @@ from comicapi.issuestring import IssueString
from comictaggerlib.coverimagewidget import CoverImageWidget
from comictaggerlib.ctsettings import ct_ns
from comictaggerlib.ui import qtutils, ui_path
from comictaggerlib.ui.qtutils import new_web_view, reduce_widget_font_size
from comictaggerlib.ui.qtutils import new_web_view
from comictalker.comictalker import ComicTalker, TalkerError
logger = logging.getLogger(__name__)
@ -71,9 +71,6 @@ class IssueSelectionWindow(QtWidgets.QDialog):
else:
logger.info("failed to open QWebEngineView")
reduce_widget_font_size(self.twList)
reduce_widget_font_size(self.teDescription, 1)
self.setWindowFlags(
QtCore.Qt.WindowType(
self.windowFlags()

View File

@ -26,7 +26,6 @@ from comictaggerlib.coverimagewidget import CoverImageWidget
from comictaggerlib.ctsettings import ct_ns
from comictaggerlib.resulttypes import IssueResult
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import reduce_widget_font_size
from comictalker.comictalker import ComicTalker
logger = logging.getLogger(__name__)
@ -58,9 +57,6 @@ class MatchSelectionWindow(QtWidgets.QDialog):
gridlayout.addWidget(self.archiveCoverWidget)
gridlayout.setContentsMargins(0, 0, 0, 0)
reduce_widget_font_size(self.twList)
reduce_widget_font_size(self.teDescription, 1)
self.setWindowFlags(
QtCore.Qt.WindowType(
self.windowFlags()

View File

@ -21,7 +21,6 @@ import logging
from PyQt5 import QtCore, QtWidgets, uic
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import reduce_widget_font_size
logger = logging.getLogger(__name__)
@ -40,5 +39,3 @@ class IDProgressWindow(QtWidgets.QDialog):
| QtCore.Qt.WindowType.WindowMaximizeButtonHint
)
)
reduce_widget_font_size(self.textEdit)

View File

@ -35,7 +35,6 @@ from comictaggerlib.matchselectionwindow import MatchSelectionWindow
from comictaggerlib.progresswindow import IDProgressWindow
from comictaggerlib.resulttypes import IssueResult
from comictaggerlib.ui import qtutils, ui_path
from comictaggerlib.ui.qtutils import new_web_view, reduce_widget_font_size
from comictalker.comictalker import ComicTalker, TalkerError
logger = logging.getLogger(__name__)
@ -127,13 +126,10 @@ class SeriesSelectionWindow(QtWidgets.QDialog):
gridlayout.setContentsMargins(0, 0, 0, 0)
self.teDetails: QtWidgets.QWidget
webengine = new_web_view(self)
webengine = qtutils.new_web_view(self)
if webengine:
self.teDetails = qtutils.replaceWidget(self.splitter, self.teDetails, webengine)
reduce_widget_font_size(self.teDetails, 1)
reduce_widget_font_size(self.twList)
self.setWindowFlags(
QtCore.Qt.WindowType(
self.windowFlags()

View File

@ -61,7 +61,7 @@ from comictaggerlib.resulttypes import Action, MatchStatus, OnlineMatchResults,
from comictaggerlib.seriesselectionwindow import SeriesSelectionWindow
from comictaggerlib.settingswindow import SettingsWindow
from comictaggerlib.ui import ui_path
from comictaggerlib.ui.qtutils import center_window_on_parent, enable_widget, reduce_widget_font_size
from comictaggerlib.ui.qtutils import center_window_on_parent, enable_widget
from comictaggerlib.versionchecker import VersionChecker
from comictalker.comictalker import ComicTalker, TalkerError
@ -269,14 +269,6 @@ class TaggerWindow(QtWidgets.QMainWindow):
self.leAltIssueNum.setValidator(validator)
self.leAltIssueCount.setValidator(validator)
# TODO set up an RE validator for issueNum that allows for all sorts of wacky things
# tweak some control fonts
reduce_widget_font_size(self.lblFilename, 1)
reduce_widget_font_size(self.lblArchiveType)
reduce_widget_font_size(self.lblTagList)
reduce_widget_font_size(self.lblPageCount)
# make sure some editable comboboxes don't take drop actions
self.cbFormat.lineEdit().setAcceptDrops(False)
self.cbMaturityRating.lineEdit().setAcceptDrops(False)

View File

@ -92,12 +92,6 @@ if qt_available:
def new_web_view(parent: QWidget) -> QWebEngineView: ...
def reduce_widget_font_size(widget: QtWidgets.QWidget, delta: int = 2) -> None:
f = widget.font()
if f.pointSize() > 10:
f.setPointSize(f.pointSize() - delta)
widget.setFont(f)
def center_window_on_screen(window: QtWidgets.QWidget) -> None:
"""Center the window on screen.