Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00

48 lines
1.1 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "./"
ModalPopup {
function doRename(){
chatsModel.groups.rename(groupName.text)
popup.close();
}
id: popup
height: 210
//% "Group name"
title: qsTrId("group-name")
onOpened: {
groupName.forceActiveFocus(Qt.MouseFocusReason)
groupName.text = chatsModel.channelView.activeChannel.name
}
Input {
id: groupName
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
//% "Group name"
placeholderText: qsTrId("group-name")
Keys.onEnterPressed: doRename()
Keys.onReturnPressed: doRename()
}
footer: StatusButton {
id: saveBtn
anchors.bottom: parent.bottom
anchors.right: parent.right
//% "Save"
text: qsTrId("save")
onClicked : doRename()
}
}