Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
992cf79c
Commit
992cf79c
authored
Aug 17, 2022
by
Julius Künzel
💬
Browse files
[Qt6] Fix QFont::Weight enum
parent
471508bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/titler/titledocument.cpp
View file @
992cf79c
...
...
@@ -463,7 +463,7 @@ int TitleDocument::loadFromXml(const QDomDocument &doc, QList<QGraphicsItem *> &
font
.
setBold
(
node
.
nodeValue
().
toInt
()
!=
0
);
}
else
{
// New: Font weight (QFont::)
font
.
setWeight
(
txtProperties
.
namedItem
(
QStringLiteral
(
"font-weight"
)).
nodeValue
().
toInt
());
font
.
setWeight
(
QFont
::
Weight
(
txtProperties
.
namedItem
(
QStringLiteral
(
"font-weight"
)).
nodeValue
().
toInt
())
)
;
}
// font.setBold(txtProperties.namedItem("font-bold").nodeValue().toInt());
font
.
setItalic
(
txtProperties
.
namedItem
(
QStringLiteral
(
"font-italic"
)).
nodeValue
().
toInt
()
!=
0
);
...
...
src/titler/titlewidget.cpp
View file @
992cf79c
...
...
@@ -1078,7 +1078,7 @@ void TitleWidget::slotNewText(MyTextItem *tt)
QFont
font
=
font_family
->
currentFont
();
font
.
setPixelSize
(
font_size
->
value
());
// mbd: issue 551:
font
.
setWeight
(
font_weight_box
->
itemData
(
font_weight_box
->
currentIndex
()).
toInt
());
font
.
setWeight
(
QFont
::
Weight
(
font_weight_box
->
itemData
(
font_weight_box
->
currentIndex
()).
toInt
())
)
;
font
.
setItalic
(
buttonItalic
->
isChecked
());
font
.
setUnderline
(
buttonUnder
->
isChecked
());
...
...
@@ -1777,7 +1777,7 @@ void TitleWidget::slotUpdateText()
font
.
setPixelSize
(
font_size
->
value
());
font
.
setItalic
(
buttonItalic
->
isChecked
());
font
.
setUnderline
(
buttonUnder
->
isChecked
());
font
.
setWeight
(
font_weight_box
->
itemData
(
font_weight_box
->
currentIndex
()).
toInt
());
font
.
setWeight
(
QFont
::
Weight
(
font_weight_box
->
itemData
(
font_weight_box
->
currentIndex
()).
toInt
())
)
;
if
(
letter_spacing
->
value
()
!=
0
)
{
font
.
setLetterSpacing
(
QFont
::
AbsoluteSpacing
,
letter_spacing
->
value
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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