diff --git a/src/gui/UserStatusSelector.qml b/src/gui/UserStatusSelector.qml index 15abf6595d876..736dbe5a86a05 100644 --- a/src/gui/UserStatusSelector.qml +++ b/src/gui/UserStatusSelector.qml @@ -145,33 +145,11 @@ ColumnLayout { property color borderColor: showBorder ? Style.ncBlue : palette.dark - // We create the square with only the top-left and bottom-left rounded corners - // by overlaying different rectangles on top of each other background: Rectangle { radius: Style.slightlyRoundedButtonRadius color: palette.button border.color: fieldButton.borderColor border.width: Style.normalBorderWidth - - Rectangle { - anchors.fill: parent - anchors.leftMargin: parent.width / 2 - anchors.rightMargin: -1 - z: 1 - color: palette.button - border.color: fieldButton.borderColor - border.width: Style.normalBorderWidth - } - - Rectangle { // We need to cover the blue border of the non-radiused rectangle - anchors.fill: parent - anchors.leftMargin: parent.width / 4 - anchors.rightMargin: parent.width / 4 - anchors.topMargin: Style.normalBorderWidth - anchors.bottomMargin: Style.normalBorderWidth - z: 2 - color: palette.button - } } contentItem: Label { @@ -212,43 +190,11 @@ ColumnLayout { TextField { id: userStatusMessageTextField - property color borderColor: activeFocus ? Style.ncBlue : palette.dark - Layout.fillWidth: true - Layout.preferredHeight: contentHeight + (Style.smallSpacing * 2) - placeholderText: qsTr("What is your status?") - placeholderTextColor: palette.dark text: userStatusSelectorModel.userStatusMessage - verticalAlignment: TextInput.AlignVCenter selectByMouse: true onEditingFinished: userStatusSelectorModel.userStatusMessage = text - - background: Rectangle { - radius: Style.slightlyRoundedButtonRadius - color: palette.base - border.color: userStatusMessageTextField.borderColor - border.width: Style.normalBorderWidth - - Rectangle { - anchors.fill: parent - anchors.rightMargin: parent.width / 2 - z: 1 - color: palette.base - border.color: userStatusMessageTextField.borderColor - border.width: Style.normalBorderWidth - } - - Rectangle { // We need to cover the blue border of the non-radiused rectangle - anchors.fill: parent - anchors.leftMargin: parent.width / 4 - anchors.rightMargin: parent.width / 4 - anchors.topMargin: Style.normalBorderWidth - anchors.bottomMargin: Style.normalBorderWidth - z: 2 - color: palette.base - } - } } } @@ -321,28 +267,20 @@ ColumnLayout { Layout.fillWidth: true Layout.alignment: Qt.AlignBottom - UserStatusSelectorButton { - // Prevent being squashed by the other buttons with larger text - Layout.minimumWidth: implicitWidth - Layout.fillHeight: true - primary: true + Button { text: qsTr("Cancel") onClicked: finished() } - UserStatusSelectorButton { + Item { // Spacing Layout.fillWidth: true - Layout.fillHeight: true - primary: true - text: qsTr("Clear status message") + } + Button { + text: qsTr("Clear") onClicked: userStatusSelectorModel.clearUserStatus() } - UserStatusSelectorButton { - Layout.fillWidth: true - Layout.fillHeight: true - primary: true - colored: true + Button { focusPolicy: Qt.StrongFocus - text: qsTr("Set status message") + text: qsTr("Apply") onClicked: userStatusSelectorModel.setUserStatus() } } diff --git a/src/gui/tray/TrayWindowHeader.qml b/src/gui/tray/TrayWindowHeader.qml index 9ba808e5b7019..3fbd8fc538764 100644 --- a/src/gui/tray/TrayWindowHeader.qml +++ b/src/gui/tray/TrayWindowHeader.qml @@ -121,14 +121,13 @@ Rectangle { model: UserAppsModel delegate: MenuItem { id: appEntry - anchors.left: parent.left - anchors.right: parent.right - text: model.appName + // HACK: Without creating our own component (and killing native styling) + // HACK: we do not have a way to adjust the text and icon spacing. + text: " " + model.appName font.pixelSize: Style.topLinePixelSize icon.source: model.appIconUrl icon.color: palette.windowText onTriggered: UserAppsModel.openAppUrl(appUrl) - hoverEnabled: true Accessible.role: Accessible.MenuItem Accessible.name: qsTr("Open %1 in browser").arg(model.appName) Accessible.onPressAction: appEntry.triggered()