Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
1387ee81
Commit
1387ee81
authored
Apr 27, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: support for pixelSize
parent
659b9b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml
View file @
1387ee81
...
...
@@ -9,7 +9,6 @@ GroupBox {
QWidget
{
layout
:
HorizontalLayout
{
rightMargin
:
12
Label
{
text
:
qsTr
(
"
Font
"
)
}
...
...
@@ -20,15 +19,56 @@ GroupBox {
}
}
}
IntEditor
{
maximumWidth
:
200
caption
:
qsTr
(
"
Size
"
)
slider
:
false
backendValue
:
backendValues
.
font_pointSize
baseStateFlag
:
isBaseState
;
QWidget
{
id
:
sizeWidget
property
bool
selectionFlag
:
selectionChanged
property
bool
pixelSize
:
sizeType
.
currentText
==
"
pixels
"
property
bool
isSetup
;
onSelectionFlagChanged
:
{
isSetup
=
true
;
sizeType
.
currentText
=
"
points
"
;
if
(
backendValues
.
font_pixelSize
.
isInModel
)
sizeType
.
currentText
=
"
pixels
"
;
isSetup
=
false
;
}
layout
:
HorizontalLayout
{
Label
{
text
:
qsTr
(
"
Size
"
)
}
SpinBox
{
visible
:
!
sizeWidget
.
pixelSize
backendValue
:
backendValues
.
font_pointSize
baseStateFlag
:
isBaseState
;
}
SpinBox
{
visible
:
sizeWidget
.
pixelSize
backendValue
:
backendValues
.
font_pixelSize
baseStateFlag
:
isBaseState
;
}
QComboBox
{
id
:
sizeType
maximumWidth
:
60
items
:
{
[
"
pixels
"
,
"
points
"
]
}
onCurrentTextChanged
:
{
if
(
sizeWidget
.
isSetup
)
return
;
if
(
currentText
==
"
pixels
"
)
{
backendValues
.
font_pointSize
.
resetValue
();
backendValues
.
font_pixelSize
.
value
=
8
;
}
else
{
backendValues
.
font_pixelSize
.
resetValue
();
}
}
}
}
}
QWidget
{
layout
:
HorizontalLayout
{
Label
{
...
...
@@ -42,8 +82,7 @@ GroupBox {
QWidget
{
visible
:
showStyle
layout
:
HorizontalLayout
{
rightMargin
:
12
layout
:
HorizontalLayout
{
Label
{
text
:
qsTr
(
"
Style
"
)
}
...
...
Write
Preview
Markdown
is supported
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