View Single Post
TransTech's Avatar
Posts: 671 | Thanked: 876 times | Joined on Mar 2011
#503
Originally Posted by MSameer View Post
Here's Colors.qml for the upcoming version:
http://gitorious.org/quran/quran/blo...qml/Colors.qml

Code:
1    // -*- qml -*-
2    import QtQuick 1.0
3    
4    QtObject {
5            id: colors
6    
7            property color textColor: _settings.nightMode ? "white" : "black"
8            property color backgroundColor: _settings.nightMode ? "black" : "white"
9            property color verseColor: _settings.nightMode ? "white" : "black"
10            property color titleColor: _settings.nightMode ? "black" : "white"
11            property color subtitleColor: _settings.nightMode ? "black" : "white"
12            property color highlightColor: _settings.nightMode ? "red" : "red"
13            property color faderColor: _settings.nightMode ? "black" : "steelblue"
14            property color sectionColor: "#a3daf4" // QColor(163, 218, 244)
15            property color col1: Qt.lighter(colors.sectionColor, 1.2)
16            property color col2: Qt.lighter(colors.sectionColor, 1.3)
17    }
Most of the work on the app side has been done already. Some parts are still missing.

If that file is simple enough then we can ship one with each theme. It defines colors for both normal mode and night mode.

I can also try to use an ini file for reading the colors.
We can ship an ini file with each theme that defines the colors.

The question is: Should the night mode be a separate theme or should it be a property of the used theme ?

I mean should we ship 2 themes by default: Day mode and night mode or should we let each theme define the colors for night mode ?

Option 1 simplifies the creation of themes.
Option 2 guarantees that each theme gets a night mode.
Thats very great... and easy.. (everything in one place )

The .ini file idea is simple and much better, because non-qml users will know which file they should edit.

And for the night mode colors part, it should be included with each file so that they can have personalized night mode too.

And if we make a night mode a different theme, then it would be a night mode theme, and not a night mode function. (the user will always have to chage between themes).

Edit:

I like option 2 as option 1 is already present. (its already easy)

Last edited by TransTech; 2012-01-31 at 16:18.