Color and icon button spacing fixes

This commit is contained in:
trilene 2021-01-06 17:15:43 -05:00 committed by Nicolas Werner
parent 9bbade37de
commit 2bd8a386e2
4 changed files with 18 additions and 47 deletions

View file

@ -12,20 +12,7 @@ Popup {
border.color: colors.windowText
}
// palette: colors
// colorize controls correctly
palette.base: colors.base
palette.brightText: colors.brightText
palette.button: colors.button
palette.buttonText: colors.buttonText
palette.dark: colors.dark
palette.highlight: colors.highlight
palette.highlightedText: colors.highlightedText
palette.light: colors.light
palette.mid: colors.mid
palette.text: colors.text
palette.window: colors.window
palette.windowText: colors.windowText
palette: colors
ColumnLayout {
@ -43,7 +30,7 @@ Popup {
Image {
Layout.preferredWidth: 22
Layout.preferredHeight: 22
source: "qrc:/icons/icons/ui/microphone-unmute.png"
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.png?" + colors.windowText
}
ComboBox {
@ -60,7 +47,7 @@ Popup {
Image {
Layout.preferredWidth: 22
Layout.preferredHeight: 22
source: "qrc:/icons/icons/ui/video-call.png"
source: "image://colorimage/:/icons/icons/ui/video-call.png?" + colors.windowText
}
ComboBox {

View file

@ -79,15 +79,14 @@ Rectangle {
Button {
Layout.rightMargin: 4
icon.source: CallManager.isVideo ? "qrc:/icons/icons/ui/video-call.png" : "qrc:/icons/icons/ui/place-call.png"
text: qsTr("Accept")
palette.button: colors.button
palette.buttonText: colors.buttonText
text: qsTr(" Accept ")
palette: colors
onClicked: {
if (CallManager.mics.length == 0) {
var dialog = deviceError.createObject(timelineRoot, {
"errorString": qsTr("No microphone found."),
"iconSource": "qrc:/icons/icons/ui/place-call.png"
"image": ":/icons/icons/ui/place-call.png"
});
dialog.open();
return;
@ -95,7 +94,7 @@ Rectangle {
else if (!CallManager.mics.includes(Settings.microphone)) {
var dialog = deviceError.createObject(timelineRoot, {
"errorString": qsTr("Unknown microphone: ") + Settings.microphone,
"iconSource": "qrc:/icons/icons/ui/place-call.png"
"image": ":/icons/icons/ui/place-call.png"
});
dialog.open();
return;
@ -103,7 +102,7 @@ Rectangle {
if (CallManager.isVideo && CallManager.cameras.length > 0 && !CallManager.cameras.includes(Settings.camera)) {
var dialog = deviceError.createObject(timelineRoot, {
"errorString": qsTr("Unknown camera: ") + Settings.camera,
"iconSource": "qrc:/icons/icons/ui/video-call.png"
"image": ":/icons/icons/ui/video-call.png"
});
dialog.open();
return;
@ -115,9 +114,8 @@ Rectangle {
Button {
Layout.rightMargin: 16
icon.source: "qrc:/icons/icons/ui/end-call.png"
text: qsTr("Decline")
palette.button: colors.button
palette.buttonText: colors.buttonText
text: qsTr(" Decline ")
palette: colors
onClicked: {
CallManager.hangUp();

View file

@ -6,7 +6,7 @@ import im.nheko 1.0
Popup {
property string errorString
property var iconSource
property var image
modal: true
anchors.centerIn: parent
@ -20,7 +20,7 @@ Popup {
Image {
Layout.preferredWidth: 16
Layout.preferredHeight: 16
source: iconSource
source: "image://colorimage/" + image + "?" + colors.windowText
}
Label {

View file

@ -8,6 +8,7 @@ Popup {
modal: true
anchors.centerIn: parent
palette: colors
background: Rectangle {
color: colors.window
border.color: colors.windowText
@ -19,21 +20,6 @@ Popup {
}
}
// palette: colors
// colorize controls correctly
palette.base: colors.base
palette.brightText: colors.brightText
palette.button: colors.button
palette.buttonText: colors.buttonText
palette.dark: colors.dark
palette.highlight: colors.highlight
palette.highlightedText: colors.highlightedText
palette.light: colors.light
palette.mid: colors.mid
palette.text: colors.text
palette.window: colors.window
palette.windowText: colors.windowText
ColumnLayout {
id: columnLayout
@ -64,7 +50,7 @@ Popup {
if (CallManager.mics.length == 0) {
var dialog = deviceError.createObject(timelineRoot, {
"errorString": qsTr("No microphone found."),
"iconSource": "qrc:/icons/icons/ui/place-call.png"
"image": ":/icons/icons/ui/place-call.png"
});
dialog.open();
return false;
@ -81,7 +67,7 @@ Popup {
}
Button {
text: qsTr("Voice")
text: qsTr(" Voice ")
icon.source: "qrc:/icons/icons/ui/place-call.png"
onClicked: {
if (buttonLayout.validateMic()) {
@ -94,7 +80,7 @@ Popup {
Button {
visible: CallManager.cameras.length > 0
text: qsTr("Video")
text: qsTr(" Video ")
icon.source: "qrc:/icons/icons/ui/video-call.png"
onClicked: {
if (buttonLayout.validateMic()) {
@ -126,7 +112,7 @@ Popup {
Image {
Layout.preferredWidth: 22
Layout.preferredHeight: 22
source: "qrc:/icons/icons/ui/microphone-unmute.png"
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.png?" + colors.windowText
}
ComboBox {
@ -146,7 +132,7 @@ Popup {
Image {
Layout.preferredWidth: 22
Layout.preferredHeight: 22
source: "qrc:/icons/icons/ui/video-call.png"
source: "image://colorimage/:/icons/icons/ui/video-call.png?" + colors.windowText
}
ComboBox {