mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
fix(app): many code style changes
This commit is contained in:
parent
3944fec690
commit
58a4ccac60
17 changed files with 56 additions and 16 deletions
|
|
@ -6,8 +6,6 @@ import Common.Styles 1.0
|
|||
// ===================================================================
|
||||
|
||||
DialogPlus {
|
||||
id: dialog
|
||||
|
||||
buttons: [
|
||||
TextButtonA {
|
||||
text: qsTr('cancel')
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.0
|
|||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// ===================================================================
|
||||
// A simple custom vertical scrollbar.
|
||||
// ===================================================================
|
||||
|
||||
ScrollBar {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject background: QtObject {
|
||||
property int height: 30
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 8
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property int radius: 3
|
||||
property int size: 18
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property int buttonsSpacing: 8
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property int lineHeight: 30
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject background: QtObject {
|
||||
property int height: 22
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject backgroundColor: QtObject {
|
||||
property color hovered: Colors.o
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject backgroundColor: QtObject {
|
||||
property color hovered: Colors.p
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import QtQuick 2.7
|
|||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject item: QtObject {
|
||||
property QtObject color: QtObject {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ ApplicationWindow {
|
|||
ActionButton {
|
||||
icon: 'call'
|
||||
onClicked: CallsWindow.show()
|
||||
|
||||
},
|
||||
|
||||
ActionButton {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue