Skip to content

Commit 43500a5

Browse files
committed
FIX: Fixing issue with font size adjusting
1 parent 02d31d3 commit 43500a5

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

trace/stylesheets/dark_mode.qss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* Global Styles */
22
QWidget {
33
background-color: #1E1E1E;
4-
font-size: 10px;
54
color: #E0E0E0;
65
}
76

@@ -168,7 +167,7 @@ QWidget[collapsible=true] {
168167

169168
QLabel[sectionHeader=true] {
170169
font-weight: bold;
171-
font-size: 11px;
170+
font-size: 11pt;
172171
color: #E0E0E0;
173172
}
174173

@@ -282,7 +281,7 @@ QToolTip {
282281
color: #FFFFFF;
283282
border: 1px solid #888888;
284283
padding: 4px;
285-
font-size: 10px;
284+
font-size: 10pt;
286285
}
287286

288287
/* Scrollbars */

trace/stylesheets/light_mode.qss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* Global Styles */
22
QWidget {
33
background-color: #FAFAFA;
4-
font-size: 10px;
54
color: #202020;
65
}
76

@@ -168,7 +167,7 @@ QWidget[collapsible=true] {
168167

169168
QLabel[sectionHeader=true] {
170169
font-weight: bold;
171-
font-size: 11px;
170+
font-size: 11pt;
172171
color: #E0E0E0;
173172
}
174173

@@ -282,7 +281,7 @@ QToolTip {
282281
color: #FFFFFF;
283282
border: 1px solid #888888;
284283
padding: 4px;
285-
font-size: 10px;
284+
font-size: 10pt;
286285
}
287286

288287
/* Scrollbars */

trace/widgets/plot_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ def set_axis_tick_font_size(self, size: int) -> None:
197197
Parameters
198198
----------
199199
size : int
200-
The font size in pixels
200+
The font size in points
201201
"""
202202
font = QFont()
203-
font.setPixelSize(size)
203+
font.setPointSize(size)
204204

205205
all_axes = self.plot.plotItem.getAxes()
206206
for axis in all_axes:

trace/widgets/settings_components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ def __init__(self, parent: QWidget, text: str, size: int = None):
2727
text : str
2828
The title text to display
2929
size : int, optional
30-
Custom font size in pixels
30+
Custom font size in points
3131
"""
3232
super().__init__(text=text, parent=parent)
3333
bold_font = QFont()
3434
bold_font.setBold(True)
3535
if size is not None:
36-
bold_font.setPixelSize(size)
36+
bold_font.setPointSize(size)
3737
self.setFont(bold_font)
3838

3939

0 commit comments

Comments
 (0)