Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point size instead of pixel size #460

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
33cdc8f
Create a switch control for all checkable toolbar actions
bmonio Apr 22, 2016
c77fd28
add comment
bmonio Apr 22, 2016
8f73a83
Add property to Action to choose if we display it as switch or tool b…
bmonio Apr 25, 2016
f2fdc05
resolve icon bug
bmonio Apr 26, 2016
a60bed9
exposed the iconButton and switch component used in the action bar, t…
Issam-Wakidi May 2, 2016
12c45a7
Merge pull request #1 from Spateof-io/QMLMAT-1-enable-switch-insert-i…
Issam-Wakidi May 6, 2016
492952a
Revert "Merge pull request #1 from Spateof-io/QMLMAT-1-enable-switch-…
oOIssaMOo Jun 18, 2016
af1488f
Merge remote-tracking branch 'upsteam/develop' into develop
oOIssaMOo Jun 18, 2016
41338db
using pointSize for fonts instead of pixelSize. Point size is plateform
oOIssaMOo Jun 19, 2016
1f22586
circle.png present in the extras.qrc but missing
oOIssaMOo Jun 19, 2016
70d0ea3
added missing file to qrc
oOIssaMOo Jun 19, 2016
3d5faf5
update the Qt verions to 5.6.1
Issam-Wakidi Jun 19, 2016
a2b8a77
Merge pull request #9 from Spateof-io/update-travis-Qt-5.6.1
Issam-Wakidi Jun 19, 2016
7e3aec5
Merge pull request #8 from Spateof-io/missing-navigation_arrow_drop_down
Issam-Wakidi Jun 19, 2016
531b97d
Merge branch 'develop' of https://github.com/Spateof-io/qml-material …
Issam-Wakidi Jun 19, 2016
ca76a36
Merge pull request #7 from Spateof-io/resolving-circle.png-missing
Issam-Wakidi Jun 19, 2016
f0c27b1
Merge branch 'develop' of https://github.com/Spateof-io/qml-material …
Issam-Wakidi Jun 19, 2016
07ae6a2
forgotten replacement of pixelSize by pointSize
Issam-Wakidi Jun 19, 2016
a6f7420
need to keep pixelsize here
Issam-Wakidi Jul 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: generic

install:
- sudo add-apt-repository -y ppa:beineri/opt-qt551-trusty
- sudo add-apt-repository -y ppa:beineri/opt-qt56-trusty
- sudo add-apt-repository -y ppa:beineri/opt-qt561-trusty
- sudo apt-get update
- sudo apt-get -y install pep8 pyflakes python python-pip npm nodejs nodejs-legacy
- sudo apt-get -y install qt55declarative qt55quickcontrols qt55graphicaleffects qt55tools qt55svg
Expand Down
92 changes: 44 additions & 48 deletions demo/demo.qrc
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
<!DOCTYPE RCC>
<RCC version="1.0">

<qresource>
<file>BottomSheetDemo.qml</file>
<file>ButtonDemo.qml</file>
<file>CheckBoxDemo.qml</file>
<file>ColorPaletteDemo.qml</file>
<file>CustomIconsDemo.qml</file>
<file>DatePickerDemo.qml</file>
<file>DialogDemo.qml</file>
<file>FormsDemo.qml</file>
<file>ListItemsDemo.qml</file>
<file>PageStackDemo.qml</file>
<file>ProgressBarDemo.qml</file>
<file>RadioButtonDemo.qml</file>
<file>SidebarPage.qml</file>
<file>SliderDemo.qml</file>
<file>SubPage.qml</file>
<file>SwitchDemo.qml</file>
<file>TextFieldDemo.qml</file>
<file>TimePickerDemo.qml</file>
<file>TypographyDemo.qml</file>
<file>icons/action_account_circle.svg</file>
<file>icons/action_autorenew.svg</file>
<file>icons/action_delete.svg</file>
<file>icons/action_language.svg</file>
<file>icons/action_settings.svg</file>
<file>icons/alert_warning.svg</file>
<file>icons/communication_email.svg</file>
<file>icons/content_add.svg</file>
<file>icons/content_create.svg</file>
<file>icons/content_forward.svg</file>
<file>icons/device_access_alarm.svg</file>
<file>icons/file_file_download.svg</file>
<file>icons/image_color_lens.svg</file>
<file>icons/maps_place.svg</file>
<file>icons/navigation_arrow_drop_down.svg</file>
<file>icons/navigation_menu.svg</file>
<file>icons/social_share.svg</file>
<file>images/balloon.jpg</file>
<file>images/go-last.color.svg</file>
<file>images/list-add.color.svg</file>
<file>images/weather-pouring.svg</file>
<file>images/weather-sunset.svg</file>
<file>main.qml</file>
</qresource>

<RCC>
<qresource prefix="/">
<file>BottomSheetDemo.qml</file>
<file>ButtonDemo.qml</file>
<file>CheckBoxDemo.qml</file>
<file>ColorPaletteDemo.qml</file>
<file>CustomIconsDemo.qml</file>
<file>DatePickerDemo.qml</file>
<file>DialogDemo.qml</file>
<file>FormsDemo.qml</file>
<file>ListItemsDemo.qml</file>
<file>PageStackDemo.qml</file>
<file>ProgressBarDemo.qml</file>
<file>RadioButtonDemo.qml</file>
<file>SidebarPage.qml</file>
<file>SliderDemo.qml</file>
<file>SubPage.qml</file>
<file>SwitchDemo.qml</file>
<file>TextFieldDemo.qml</file>
<file>TimePickerDemo.qml</file>
<file>TypographyDemo.qml</file>
<file>icons/action_account_circle.svg</file>
<file>icons/action_autorenew.svg</file>
<file>icons/action_delete.svg</file>
<file>icons/action_language.svg</file>
<file>icons/action_settings.svg</file>
<file>icons/alert_warning.svg</file>
<file>icons/communication_email.svg</file>
<file>icons/content_add.svg</file>
<file>icons/content_create.svg</file>
<file>icons/content_forward.svg</file>
<file>icons/device_access_alarm.svg</file>
<file>icons/file_file_download.svg</file>
<file>icons/image_color_lens.svg</file>
<file>icons/maps_place.svg</file>
<file>icons/navigation_arrow_drop_down.svg</file>
<file>icons/social_share.svg</file>
<file>images/balloon.jpg</file>
<file>images/go-last.color.svg</file>
<file>images/list-add.color.svg</file>
<file>images/weather-pouring.svg</file>
<file>images/weather-sunset.svg</file>
<file>main.qml</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion src/components/DatePicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Controls.Calendar {
Label {
id: dayTitle
font.weight: Font.DemiBold
font.pixelSize: 36 * Units.dp
font.pointSize: 36
Layout.fillWidth: true
lineHeight: 0.9
wrapMode: Text.Wrap
Expand Down
4 changes: 2 additions & 2 deletions src/controls/Label.qml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ Text {

property var fontInfo: fontStyles[style]

font.pixelSize: (!Device.isMobile && fontInfo.size_desktop
? fontInfo.size_desktop : fontInfo.size) * Units.dp
font.pointSize: (!Device.isMobile && fontInfo.size_desktop
? fontInfo.size_desktop : fontInfo.size)
font.family: "Roboto"
font.weight: {
var weight = fontInfo.font
Expand Down
2 changes: 1 addition & 1 deletion src/core/AwesomeIcon.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Item {
color: Theme.light.iconColor
style: shadow ? Text.Raised : Text.Normal
styleColor: Qt.rgba(0,0,0,0.5)
font.pixelSize: widget.size
font.pixelSize : widget.size

Behavior on color {
ColorAnimation { duration: 200 }
Expand Down
2 changes: 1 addition & 1 deletion src/core/UnitsHelper.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import QtQuick 2.4

Label {
text:"A"
font.pixelSize: dp(50)
font.pointSize: 50
}
}
\endqml
Expand Down
22 changes: 9 additions & 13 deletions src/extras/extras.qrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<!DOCTYPE RCC>
<RCC version="1.0">

<qresource prefix="/Material/Extras">
<file>AutomaticGrid.qml</file>
<file>CircleImage.qml</file>
<file>CircleMask.qml</file>
<file>ColumnFlow.qml</file>
<file>Image.qml</file>
<file>circle.png</file>
<file>qmldir</file>
</qresource>

<RCC>
<qresource prefix="/Material/Extras">
<file>AutomaticGrid.qml</file>
<file>CircleImage.qml</file>
<file>CircleMask.qml</file>
<file>ColumnFlow.qml</file>
<file>Image.qml</file>
<file>qmldir</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion src/listitems/Subheader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ View {
Label {
id: label

font.pixelSize: 14 * Units.dp
font.pointSize: 14
font.family: "Roboto"
font.weight: Font.DemiBold

Expand Down
4 changes: 2 additions & 2 deletions src/popups/MenuField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Item {
text: field.placeholderText
visible: floatingLabel

font.pixelSize: 12 * Units.dp
font.pointSize: 12

anchors.bottom: spinBox.top
anchors.bottomMargin: 8 * Units.dp
Expand Down Expand Up @@ -199,7 +199,7 @@ Item {
}

visible: hasHelperText
font.pixelSize: 12 * Units.dp
font.pointSize: 12
color: field.hasError ? field.errorColor : Qt.darker(Theme.light.hintColor)

Behavior on color {
Expand Down
4 changes: 2 additions & 2 deletions src/styles/SliderStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ SliderStyle {
verticalAlignment: Qt.AlignVCenter
text: knobLabel
fontSizeMode: Text.Fit
font.pixelSize: knobDiameter - 19 * Units.dp
minimumPixelSize: 6 * Units.dp
font.pointSize: knobDiameter - 19
minimumPointSize : 6
wrapMode: Text.WordWrap
color: Theme.lightDark(styleColor,
Theme.light.textColor,
Expand Down
12 changes: 6 additions & 6 deletions src/styles/TextFieldStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TextFieldStyle {

font {
family: echoMode == TextInput.Password ? "Default" : "Roboto"
pixelSize: 16 * Units.dp
pointSize: 16
}

renderType: Text.QtRendering
Expand Down Expand Up @@ -78,7 +78,7 @@ TextFieldStyle {

anchors.verticalCenter: parent.verticalCenter
text: control.placeholderText
font.pixelSize: 16 * Units.dp
font.pointSize: 16
anchors.margins: -12 * Units.dp
color: background.hasError ? background.errorColor
: control.activeFocus && control.text !== ""
Expand All @@ -95,7 +95,7 @@ TextFieldStyle {
}
PropertyChanges {
target: fieldPlaceholder
font.pixelSize: 12 * Units.dp
font.pointSize: 12
}
},
State {
Expand All @@ -117,7 +117,7 @@ TextFieldStyle {
}
NumberAnimation {
duration: 200
property: "font.pixelSize"
property: "font.pointSize"
}
}
]
Expand All @@ -137,7 +137,7 @@ TextFieldStyle {
id: helperTextLabel
visible: background.helperText && background.showBorder
text: background.helperText
font.pixelSize: 12 * Units.dp
font.pointSize: 12
color: background.hasError ? background.errorColor
: Qt.darker(Theme.light.hintColor)

Expand All @@ -154,7 +154,7 @@ TextFieldStyle {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
visible: background.characterLimit && background.showBorder
text: control.length + " / " + background.characterLimit
font.pixelSize: 12 * Units.dp
font.pointSize: 12
color: background.hasError ? background.errorColor : Theme.light.hintColor
horizontalAlignment: Text.AlignLeft

Expand Down