fix(app): many code style changes

This commit is contained in:
Ronan Abhamon 2016-10-14 09:17:32 +02:00
parent 3944fec690
commit 58a4ccac60
17 changed files with 56 additions and 16 deletions

View file

@ -6,8 +6,6 @@ import Common.Styles 1.0
// ===================================================================
DialogPlus {
id: dialog
buttons: [
TextButtonA {
text: qsTr('cancel')

View file

@ -3,6 +3,8 @@ import QtQuick.Controls 2.0
import Common.Styles 1.0
// ===================================================================
// A simple custom vertical scrollbar.
// ===================================================================
ScrollBar {

View file

@ -35,8 +35,12 @@ Button {
? textColorHovered
: textColorNormal
)
font.bold: true
font.pointSize: AbstractTextButtonStyle.text.fontSize
font {
bold: true
pointSize: AbstractTextButtonStyle.text.fontSize
}
horizontalAlignment: Text.AlignHCenter
text: button.text
verticalAlignment: Text.AlignVCenter

View file

@ -47,8 +47,8 @@ CheckBox {
radius: CheckBoxTextStyle.radius
visible: checkBox.checked
width: parent.width - x * 2
x: 4 // Fixed, no style.
y: 4 // Fixed, no style.
x: 4 // Fixed, no needed to use style file.
y: 4 // Same thing.
}
}
}

View file

@ -82,8 +82,12 @@ RowLayout {
Text {
anchors.fill: textEdit
color: ListFormStyle.value.placeholder.color
font.italic: true
font.pointSize: ListFormStyle.value.placeholder.fontSize
font {
italic: true
pointSize: ListFormStyle.value.placeholder.fontSize
}
padding: textEdit.padding
text: textEdit.text.length === 0 && !textEdit.activeFocus
? listForm.placeholder

View file

@ -37,11 +37,14 @@ ColumnLayout {
width: menu.entryWidth
RowLayout {
anchors.left: parent.left
anchors.leftMargin: MenuStyle.entry.leftMargin
anchors.right: parent.right
anchors.rightMargin: MenuStyle.entry.rightMargin
anchors.verticalCenter: parent.verticalCenter
anchors {
left: parent.left
leftMargin: MenuStyle.entry.leftMargin
right: parent.right
rightMargin: MenuStyle.entry.rightMargin
verticalCenter: parent.verticalCenter
}
spacing: MenuStyle.entry.spacing
Icon {

View file

@ -3,6 +3,9 @@ import QtQuick.Controls 2.0
import Common.Styles 1.0
// ===================================================================
// A reusable search input which display a entries model in a menu.
// Each entry can be filtered with the search input.
// ===================================================================
Item {
@ -11,12 +14,15 @@ Item {
property alias delegate: list.delegate
property alias entryHeight: menu.entryHeight
property alias maxMenuHeight: menu.maxMenuHeight
// This property must implement `setFilterFixedString` and/or
// `invalidate` functions.
property alias model: list.model
property alias placeholderText: searchField.placeholderText
signal menuClosed ()
signal menuOpened ()
signal searchTextChanged (string text)
function _hideMenu () {
menu.hide()
@ -48,7 +54,13 @@ Item {
Keys.onEscapePressed: _hideMenu()
onActiveFocusChanged: activeFocus && _showMenu()
onTextChanged: searchTextChanged(text)
onTextChanged: {
model.setFilterFixedString(text)
if (model.invalidate) {
model.invalidate()
}
}
}
DropDownMenu {

View file

@ -1,6 +1,8 @@
pragma Singleton
import QtQuick 2.7
// ===================================================================
QtObject {
property QtObject background: QtObject {
property int height: 30

View file

@ -1,6 +1,8 @@
pragma Singleton
import QtQuick 2.7
// ===================================================================
QtObject {
property int spacing: 8
}

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property int radius: 3
property int size: 18

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property int buttonsSpacing: 8

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property int lineHeight: 30

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property QtObject background: QtObject {
property int height: 22

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property QtObject backgroundColor: QtObject {
property color hovered: Colors.o

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property QtObject backgroundColor: QtObject {
property color hovered: Colors.p

View file

@ -3,6 +3,8 @@ import QtQuick 2.7
import Common 1.0
// ===================================================================
QtObject {
property QtObject item: QtObject {
property QtObject color: QtObject {

View file

@ -100,7 +100,6 @@ ApplicationWindow {
ActionButton {
icon: 'call'
onClicked: CallsWindow.show()
},
ActionButton {