mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Welcome page images
add resources file belledonne image Revert "belledonne image" This reverts commit 4f7ea04c16aaec1ed321590620c61fad6010a148. image add images resources new images Welcome page images add resources file belledonne image Revert "belledonne image" This reverts commit 4f7ea04c16aaec1ed321590620c61fad6010a148. image add images resources new images image image cmake providers Constants Constants start welcome page start welcome page Welcome page welcome and login pages default text item Item : default input cell for any form qml items welcome/login template add resources files to macro cmake LoginPage : get username/pwd and call login make welcome page temporary icons main stack view Add final text + anims welcome page fix previous register constants in initCppInterfaces unify images names MR thread : clean move login pages use styling qml file mr threads: unify colors remove anchors warnings custom combobox + modify custom textinput mr thread : indent mr thread : pointsize in style mr thread : default style singleton icons as style change login base layout name mr thread : color in style
This commit is contained in:
parent
2c69ae7fec
commit
592d64bc8c
9 changed files with 220 additions and 5 deletions
|
|
@ -108,6 +108,12 @@ void App::initCppInterfaces() {
|
|||
LinphoneEnums::registerMetaTypes();
|
||||
}
|
||||
|
||||
void App::registerToolTypes() {
|
||||
qmlRegisterSingletonType<Constants>(
|
||||
"ConstantsCpp", 1, 0, "ConstantsCpp",
|
||||
[](QQmlEngine *engine, QJSEngine *) -> QObject * { return new Constants(engine); });
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
void App::clean() {
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc
|
|||
"data/image/return-arrow.svg"
|
||||
)
|
||||
|
||||
set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE)
|
||||
set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE)
|
||||
|
|
|
|||
|
|
@ -82,4 +82,4 @@ QQuickTextureFactory *ImageAsyncImageResponse::textureFactory() const {
|
|||
QQuickImageResponse *ImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize) {
|
||||
ImageAsyncImageResponse *response = new ImageAsyncImageResponse(id, requestedSize);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,4 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
77
Linphone/view/Item/FormComboBoxCell.qml
Normal file
77
Linphone/view/Item/FormComboBoxCell.qml
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts 1.0
|
||||
import Linphone
|
||||
|
||||
ColumnLayout {
|
||||
id: cellLayout
|
||||
property string label: ""
|
||||
property int backgroundWidth: 200
|
||||
property variant modelList: []
|
||||
|
||||
Layout.bottomMargin: 8
|
||||
Text {
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: cellLayout.label
|
||||
color: DefaultStyle.formItemLabelColor
|
||||
font {
|
||||
pointSize: DefaultStyle.formItemLabelSize
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: combobox
|
||||
model: cellLayout.modelList
|
||||
background: Loader {
|
||||
sourceComponent: backgroundRectangle
|
||||
}
|
||||
contentItem: Text {
|
||||
leftPadding: 10
|
||||
text: combobox.displayText
|
||||
font.family: DefaultStyle.defaultFont
|
||||
font.pointSize: DefaultStyle.formItemLabelSize
|
||||
color: DefaultStyle.formItemLabelColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
indicator: Image {
|
||||
x: combobox.width - width - combobox.rightPadding
|
||||
y: combobox.topPadding + (combobox.availableHeight - height) / 2
|
||||
source: AppIcons.downArrow
|
||||
// width: 12
|
||||
// height: 8
|
||||
}
|
||||
|
||||
popup: Popup {
|
||||
y: combobox.height - 1
|
||||
width: combobox.width
|
||||
implicitHeight: contentItem.implicitHeight
|
||||
padding: 1
|
||||
|
||||
contentItem: ListView {
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
model: combobox.popup.visible ? combobox.delegateModel : null
|
||||
currentIndex: combobox.highlightedIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Loader {
|
||||
sourceComponent: backgroundRectangle
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: backgroundRectangle
|
||||
Rectangle {
|
||||
implicitWidth: cellLayout.backgroundWidth
|
||||
implicitHeight: 30
|
||||
radius: 20
|
||||
color: DefaultStyle.formItemBackgroundColor
|
||||
opacity: 0.7
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Linphone/view/Item/FormTextInputCell.qml
Normal file
62
Linphone/view/Item/FormTextInputCell.qml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts 1.0
|
||||
import Linphone
|
||||
|
||||
ColumnLayout {
|
||||
id: cellLayout
|
||||
Layout.bottomMargin: 8
|
||||
|
||||
property string label: ""
|
||||
property string defaultText : ""
|
||||
property bool mandatory: false
|
||||
property bool hidden: false
|
||||
property int textInputWidth: 200
|
||||
readonly property string inputText: textField.text
|
||||
|
||||
Text {
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: cellLayout.label + (cellLayout.mandatory ? "*" : "")
|
||||
color: DefaultStyle.formItemLabelColor
|
||||
font {
|
||||
pointSize: DefaultStyle.formItemLabelSize
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
implicitWidth: cellLayout.textInputWidth
|
||||
implicitHeight: 30
|
||||
// anchors.fill: parent
|
||||
radius: 20
|
||||
color: DefaultStyle.formItemBackgroundColor
|
||||
opacity: 0.7
|
||||
TextField {
|
||||
id: textField
|
||||
anchors.left: parent.left
|
||||
anchors.right: eyeButton.visible ? eyeButton.left : parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
placeholderText: cellLayout.defaultText
|
||||
echoMode: (cellLayout.hidden && !eyeButton.checked) ? TextInput.Password : TextInput.Normal
|
||||
font.family: DefaultStyle.defaultFont
|
||||
font.pointSize: DefaultStyle.formTextInputSize
|
||||
color: DefaultStyle.formItemLabelColor
|
||||
background: Item {
|
||||
opacity: 0.
|
||||
}
|
||||
}
|
||||
Button {
|
||||
id: eyeButton
|
||||
visible: cellLayout.hidden
|
||||
checkable: true
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
anchors.right: parent.right
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: eyeButton.checked ? AppIcons.eyeHide : AppIcons.eyeShow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Linphone/view/Page/Login/LoginLayout.qml
Normal file
70
Linphone/view/Page/Login/LoginLayout.qml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* Qml template used for welcome and login/register pages
|
||||
**/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 2.2 as Control
|
||||
|
||||
import Linphone
|
||||
|
||||
Item {
|
||||
id: mainItem
|
||||
property alias titleContent : titleLayout.children
|
||||
property alias centerContent : centerLayout.children
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Layout.fillHeight: true
|
||||
ColumnLayout {
|
||||
Layout.rightMargin: 25
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 50
|
||||
Layout.topMargin: 20
|
||||
Layout.bottomMargin: 20
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
Control.Button {
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
contentItem: Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: AppIcons.info
|
||||
}
|
||||
onClicked: console.debug("[LoginLayout] open about popup")
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignRight |Qt.AlignVCenter
|
||||
text: "About"
|
||||
font.pixelSize: 12
|
||||
color: DefaultStyle.grayColor
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
id: titleLayout
|
||||
Layout.leftMargin: 40
|
||||
Layout.bottomMargin: 20
|
||||
}
|
||||
ColumnLayout {
|
||||
id: centerLayout
|
||||
Layout.leftMargin: 40
|
||||
Layout.fillHeight: true
|
||||
Layout.topMargin: 20
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
Image {
|
||||
Layout.minimumHeight: 80
|
||||
Layout.fillWidth: true
|
||||
source: AppIcons.belldonne
|
||||
fillMode: Image.Stretch
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13,4 +13,4 @@ QtObject {
|
|||
property string loginImage: "image://internal/login-image.svg"
|
||||
property string belledonne: "image://internal/belledonne.svg"
|
||||
property string profile: "image://internal/profil.svg"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ QtObject {
|
|||
property int defaultFontPointSize: 10
|
||||
property int title1FontPointSize: 40
|
||||
property int title2FontPointSize: 20
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue