Warning, /multimedia/kid3/src/qml/app/UiConstants.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * \file UiConstants.qml
0003  * Constants for UI metrics.
0004  *
0005  * \b Project: Kid3
0006  * \author Urs Fleisch
0007  * \date 16 Feb 2015
0008  *
0009  * Copyright (C) 2015-2018  Urs Fleisch
0010  *
0011  * This program is free software; you can redistribute it and/or modify
0012  * it under the terms of the GNU Lesser General Public License as published by
0013  * the Free Software Foundation; version 3.
0014  *
0015  * This program is distributed in the hope that it will be useful,
0016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  * GNU Lesser General Public License for more details.
0019  *
0020  * You should have received a copy of the GNU Lesser General Public License
0021  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0022  */
0023 
0024 import QtQuick 2.11
0025 
0026 QtObject {
0027   function gu(n) {
0028     return n * gridUnit
0029   }
0030 
0031   function openPopup(component, parent, params) {
0032     var popover
0033     if (params !== undefined) {
0034       popover = component.createObject(parent, params)
0035     } else {
0036       popover = component.createObject(parent)
0037     }
0038     popover.open()
0039     return popover
0040   }
0041 
0042   property int gridUnit: 8
0043   property int titlePixelSize: 14
0044   property real imageScaleFactor: 1.0
0045   property int margins: gu(1)
0046   property int spacing: gu(1)
0047   property color errorColor: "red"
0048   property int rowHeight: gu(6)
0049   property int controlHeight: gu(5)
0050   property SystemPalette palette: SystemPalette {}
0051   property color highlightColor: palette.highlight
0052   property color highlightedTextColor: palette.highlightedText
0053   property color textColor: palette.text
0054   property color baseColor: palette.base
0055 }