linux.x86.linphone/Linphone/view/Item/Button.qml
Gaelle Braud 99b1fb9bde Test file for qml items :
Text
ComboBox
TextInput
Button
TabBar
Tooltip
Carousel
+ fixes on this items
2023-11-02 17:26:47 +01:00

37 lines
1 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.2 as Control
import Linphone
Control.Button {
id: mainItem
property int capitalization
property bool inversedColors: false
property int textSize: DefaultStyle.buttonTextSize
background: Rectangle {
color: inversedColors ? DefaultStyle.buttonInversedBackground : DefaultStyle.buttonBackground
radius: 24
border.color: inversedColors ? DefaultStyle.buttonBackground : DefaultStyle.buttonInversedBackground
}
contentItem: Text {
textItem.horizontalAlignment: Text.AlignHCenter
textItem.verticalAlignment: Text.AlignVCenter
textItem.leftPadding: 11
textItem.rightPadding: 11
textItem.topPadding: 6
textItem.bottomPadding: 6
textItem.wrapMode: Text.WordWrap
textItem.text: mainItem.text
textItem.color: inversedColors ? DefaultStyle.buttonInversedTextColor : DefaultStyle.buttonTextColor
textItem.font {
bold: true
pointSize: mainItem.textSize
family: DefaultStyle.defaultFont
capitalization: mainItem.capitalization
}
}
hoverEnabled: true
}