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

Theming #41

Merged
merged 16 commits into from Jun 9, 2017
Merged

Theming #41

merged 16 commits into from Jun 9, 2017

Conversation

neochapay
Copy link
Contributor

@neochapay neochapay commented May 16, 2017

Add theming support. Now we have 28 parametrs size, colors and other

itemWidthLarge;        //320
itemWidthMedium;       //240
itemWidthSmall;        //120
itemWidthExtraSmall;   //72

itemHeightHuge;        //80
itemHeightExtraLarge;  //75
itemHeightLarge;       //63
itemHeightMedium;      //50
itemHeightSmall;       //40
itemHeightExtraSmall;  //32

itemSpacingHuge;        //40
itemSpacingLarge;       //20
itemSpacingMedium;      //15
itemSpacingSmall;       //10
itemSpacingExtraSmall;         //8

fontSizeExtraLarge;     //30
fontSizeLarge;          //24
fontSizeMedium;         //20
fontSizeSmall;          //18
fontSizeTiny;           //16
fontWeightLarge;        //63
fontWeightMedium;       //25
fontFamily;         

accentColor;            //#0091e5
fillColor;              //#474747
fillDarkColor;          //#313131
textColor;              //#ffffff
backgroundColor;        //#000000
backgroundAccentColor;  //#ffffff

This is almost all the parameters that we need IMHO. All parametrs can be changed in json theme file and all application can change theme. I do not think it's a good idea but i dont know how to use that functional correctly...

@chriadam
Copy link

Potentially might be a good idea to add animation durations (opacity fade duration, menu expansion duration, etc) to the Theme, to avoid hardcoding stuff everywhere. One other thing I see often is opacity values (e.g. for disabled options, etc) so it might be worth standardising theme values for that sort of thing too.

@neochapay
Copy link
Contributor Author

I think commit ready

@eekkelund
Copy link
Contributor

No other page works in "Glacier UI" example application than the main.qml. All other pages give the basic [W] unknown:334 - file:///usr/lib/qt5/qml/QtQuick/Controls/Nemo/Header.qml:334:23: Unable to assign [undefined] to QQmlListProperty<QQuickItem> Error. This is after two last commits, earlier almost all pages worked, except selectRoller and listView pages.

Also IMO font sizes are quite small(Maybe also itemHeights).

@neochapay
Copy link
Contributor Author

@eekkelund Qt 5.6 ?

@eekkelund
Copy link
Contributor

@neochapay Yes

@neochapay
Copy link
Contributor Author

Use this example/touch/main.qml file https://gist.github.com/neochapay/81d4938c1a0f552a7b05dfe8533ff8e4 and send me log when you try run selectRoller and listView pages.

@eekkelund
Copy link
Contributor

All the other pages started to work except listView, here is the output:

[D] onClicked:226 - Error:  qrc:/content/ListViewPage.qml:-1 File not found

[W] unknown:334 - file:///usr/lib/qt5/qml/QtQuick/Controls/Nemo/Header.qml:334:23: Unable to assign [undefined] to QQmlListProperty<QQuickItem>

@neochapay
Copy link
Contributor Author

@eekkelund try clean build or remove examples/touch/qrc_*

@neochapay neochapay changed the title [WIP] Theming Theming May 30, 2017
@locusf
Copy link
Member

locusf commented Jun 5, 2017

@eekkelund @neochapay are you guys ready to merge this?

@neochapay
Copy link
Contributor Author

@locusf i have some errors with examples and i can`t check...but if @eekkelund says all is ok - i think we can merge that

@eekkelund
Copy link
Contributor

Well the example application doesn't work ATM at all, only the first page is visible. If you are able to fix this, @neochapay, then merge is ok for me. If you don't have time I could try to check what is causing the problem.

@neochapay
Copy link
Contributor Author

Ready

@locusf
Copy link
Member

locusf commented Jun 9, 2017

@neochapay
Copy link
Contributor Author

@locusf path of ?

@locusf
Copy link
Member

locusf commented Jun 9, 2017

All tests pass now for me. Listview isn't visible due to changes in sailfish qt, nothing to do with @neochapay code.

@locusf locusf merged commit 3858cd5 into nemomobile:master Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants