2 * Copyright 2014 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 import Ubuntu.Components 1.1
18 import Ubuntu.Components.Styles 1.1 as Style
20 // FIXME: copied with large modifications from Ubuntu UI Toolkit's Ambiance's theme
24 contentHeight: units.gu(7)
25 separatorSource: "graphics/PageHeaderBaseDividerLight.sci"
26 separatorBottomSource: "graphics/PageHeaderBaseDividerBottom.png"
27 fontWeight: Font.Light
29 textColor: styledItem.config.foregroundColor
30 textLeftMargin: units.gu(2)
32 implicitHeight: headerStyle.contentHeight
39 leftMargin: headerStyle.textLeftMargin
41 verticalCenter: parent.verticalCenter
43 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
44 text: styledItem.title
45 font.weight: headerStyle.fontWeight
46 fontSize: headerStyle.fontSize
47 color: headerStyle.textColor
48 elide: Text.ElideRight
55 topMargin: separatorBottom.height
59 source: headerStyle.separatorSource
60 height: styledItem.config.sections.model !== undefined ? units.gu(3) : units.gu(2)
72 source: headerStyle.separatorBottomSource