Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basile Starynkevitch
ref_per_sys
Commits
d6b4b1bb
Commit
d6b4b1bb
authored
May 04, 2020
by
Basile Starynkevitch
Browse files
no want to set window-label-font. See issue#30
parent
4e2e3d79
Changes
2
Hide whitespace changes
Inline
Side-by-side
.qt-refpersys.ini
View file @
d6b4b1bb
# default RefPerSys Qt settings
# see http://refpersys.org/
# see http://refpersys.org/
and https://doc.qt.io/qt-5/qsettings.html
# file refpersys/.qt-refpersys.ini
## the font for windows label
window
/
label
/
font
=
FreeSans, 15
window
_
label
_
font
=
Bitstream%20Vera%20Sans,12,-1,5,75,0,0,0,0,0
## to output tagged integers
out/int/
bgcolor
=
azure
...
...
window_qrps.cc
View file @
d6b4b1bb
...
...
@@ -72,15 +72,19 @@ RpsQWindow::RpsQWindow (QWidget *parent, int rank)
{
QSettings
*
qst
=
RpsQApplication
::
qt_settings
();
RPS_ASSERT
(
qst
);
constexpr
const
char
*
label_setting_name
=
"window_label_font"
;
RPS_DEBUG_LOG
(
GUI
,
"RpsQWindow::RpsQWindow settings path: "
<<
qst
->
fileName
().
toStdString
());
QFont
label_font
=
qst
->
value
(
"window/label/font"
).
value
<
QFont
>
();
<<
qst
->
fileName
().
toStdString
()
<<
" "
<<
((
qst
->
contains
(
QString
(
label_setting_name
)))
?
"has"
:
"without"
)
<<
" "
<<
label_setting_name
);
QFont
label_font
=
qst
->
value
(
label_setting_name
).
value
<
QFont
>
();
int
label_fontsize
=
label_font
.
pointSize
();
int
label_minheight
=
(
label_fontsize
)
>
2
?
((
4
*
label_fontsize
)
/
3
+
1
)
:
10
;
int
label_maxheight
=
(
label_fontsize
)
>
2
?
(
2
*
label_fontsize
)
:
24
;
if
(
label_maxheight
<=
label_minheight
+
2
)
label_maxheight
=
(
9
*
label_minheight
)
/
8
+
1
;
RPS_DEBUG_LOG
(
GUI
,
"RpsQWindow::RpsQWindow label_
font:
"
<<
label_font
.
toString
().
toStdString
()
RPS_DEBUG_LOG
(
GUI
,
"RpsQWindow::RpsQWindow
"
<<
label_
setting_name
<<
":=
"
<<
label_font
.
toString
().
toStdString
()
<<
", label_fontsize="
<<
label_fontsize
<<
", label_minheight="
<<
label_minheight
<<
", label_maxheight="
<<
label_maxheight
);
...
...
Basile Starynkevitch
@bstarynk
mentioned in issue
#30
·
May 04, 2020
mentioned in issue
#30
mentioned in issue #30
Toggle commit list
Basile Starynkevitch
@bstarynk
mentioned in issue
#26
·
May 04, 2020
mentioned in issue
#26
mentioned in issue #26
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment