added a few constants, e.g. text sizes, paddings ...

This commit is contained in:
Hauke Schade 2012-11-21 17:21:48 +01:00
parent b8c78290fd
commit cc796f57f2
4 changed files with 38 additions and 4 deletions

View file

@ -76,7 +76,7 @@ Page {
id: mainText
text: model.title
font.weight: Font.Bold
font.pixelSize: 26
font.pixelSize: constant.fontSizeLarge
color: (model.unreadcount > 0) ? "#000033" : "#888888";
}
@ -85,7 +85,7 @@ Page {
id: subText
text: model.subtitle
font.weight: Font.Light
font.pixelSize: 22
font.pixelSize: constant.fontSizeSmall
color: (model.unreadcount > 0) ? "#cc6633" : "#888888"
visible: text != ""

32
qml/ttrss/Constants.qml Normal file
View file

@ -0,0 +1,32 @@
//Copyright Hauke Schade, 2012
//
//This file is part of TTRss.
//
//TTRss is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the
//Free Software Foundation, either version 2 of the License, or (at your option) any later version.
//TTRss is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//You should have received a copy of the GNU General Public License along with TTRss (on a Maemo/Meego system there is a copy
//in /usr/share/common-licenses. If not, see http://www.gnu.org/licenses/.
import QtQuick 1.1
QtObject{
id: constant
property int paddingSmall: 4
property int paddingMedium: 6
property int paddingLarge: 8
property int paddingXLarge: 12
property int paddingXXLarge: 16
property int fontSizeXSmall: 20
property int fontSizeSmall: 22
property int fontSizeMedium: 24
property int fontSizeLarge: 26
property int fontSizeXLarge: 28
property int fontSizeXXLarge: 32
property int headerHeight: inPortrait ? 72 : 56
property url sourceRepoSite: "https://github.com/cnlpete/ttrss"
}

View file

@ -79,7 +79,7 @@ Page {
id: mainText
text: model.title
font.weight: Font.Bold
font.pixelSize: 26
font.pixelSize: constant.fontSizeLarge
color: (model.unreadcount > 0) ? "#000033" : "#888888";
}
@ -88,7 +88,7 @@ Page {
id: subText
text: model.subtitle
font.weight: Font.Light
font.pixelSize: 22
font.pixelSize: constant.fontSizeSmall
color: (model.unreadcount > 0) ? "#cc6633" : "#888888"
visible: text != ""

View file

@ -33,6 +33,8 @@ PageStackWindow {
initialPage: mainPage
Constants{ id: constant }
MainPage {
id: mainPage
}