diff --git a/trace/stylesheets/dark_mode.qss b/trace/stylesheets/dark_mode.qss index 94a6975..b3194c3 100644 --- a/trace/stylesheets/dark_mode.qss +++ b/trace/stylesheets/dark_mode.qss @@ -1,7 +1,6 @@ /* Global Styles */ QWidget { background-color: #1E1E1E; - font-size: 10px; color: #E0E0E0; } @@ -168,7 +167,7 @@ QWidget[collapsible=true] { QLabel[sectionHeader=true] { font-weight: bold; - font-size: 11px; + font-size: 11pt; color: #E0E0E0; } @@ -282,7 +281,7 @@ QToolTip { color: #FFFFFF; border: 1px solid #888888; padding: 4px; - font-size: 10px; + font-size: 10pt; } /* Scrollbars */ diff --git a/trace/stylesheets/light_mode.qss b/trace/stylesheets/light_mode.qss index 1fdd5d9..7a72bb0 100644 --- a/trace/stylesheets/light_mode.qss +++ b/trace/stylesheets/light_mode.qss @@ -1,7 +1,6 @@ /* Global Styles */ QWidget { background-color: #FAFAFA; - font-size: 10px; color: #202020; } @@ -168,7 +167,7 @@ QWidget[collapsible=true] { QLabel[sectionHeader=true] { font-weight: bold; - font-size: 11px; + font-size: 11pt; color: #E0E0E0; } @@ -282,7 +281,7 @@ QToolTip { color: #FFFFFF; border: 1px solid #888888; padding: 4px; - font-size: 10px; + font-size: 10pt; } /* Scrollbars */ diff --git a/trace/widgets/plot_settings.py b/trace/widgets/plot_settings.py index de40738..9fcc7aa 100644 --- a/trace/widgets/plot_settings.py +++ b/trace/widgets/plot_settings.py @@ -197,10 +197,10 @@ def set_axis_tick_font_size(self, size: int) -> None: Parameters ---------- size : int - The font size in pixels + The font size in points """ font = QFont() - font.setPixelSize(size) + font.setPointSize(size) all_axes = self.plot.plotItem.getAxes() for axis in all_axes: diff --git a/trace/widgets/settings_components.py b/trace/widgets/settings_components.py index 515ac28..5ce27b4 100644 --- a/trace/widgets/settings_components.py +++ b/trace/widgets/settings_components.py @@ -27,13 +27,13 @@ def __init__(self, parent: QWidget, text: str, size: int = None): text : str The title text to display size : int, optional - Custom font size in pixels + Custom font size in points """ super().__init__(text=text, parent=parent) bold_font = QFont() bold_font.setBold(True) if size is not None: - bold_font.setPixelSize(size) + bold_font.setPointSize(size) self.setFont(bold_font)