diff --git a/src/app/settingsview/components/LogsView.qml b/src/app/settingsview/components/LogsView.qml index 2db0890249eedb89bdb95ed75a0e7ceb40620b31..bb7580d19c1912f5a057845cd574806d47ac320a 100644 --- a/src/app/settingsview/components/LogsView.qml +++ b/src/app/settingsview/components/LogsView.qml @@ -85,136 +85,123 @@ Window { } hasOpened = true; } + color: JamiTheme.backgroundColor ColumnLayout { anchors.fill: parent spacing: 0 - Rectangle { - id: buttonRectangleBackground + RowLayout { + id: buttons - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: JamiTheme.preferredFieldHeight * 2 - - border.width: 0 - color: JamiTheme.backgroundColor - radius: JamiTheme.modalPopupRadius - - RowLayout { - id: buttons - - anchors.centerIn: parent - - ToggleSwitch { - id: startStopToggle - - Layout.fillWidth: true - Layout.leftMargin: JamiTheme.preferredMarginSize - Layout.rightMargin: JamiTheme.preferredMarginSize - - checked: false - labelText: JamiStrings.logsViewDisplay - - onSwitchToggled: { - logging = !logging; - if (logging) { - isStopped = false; - root.cancelPressed = false; - monitor(true); - } else { - isStopped = true; - root.cancelPressed = true; - monitor(false); - } - } - } - - MaterialButton { - id: clearButton - - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: JamiTheme.preferredMarginSize - Layout.bottomMargin: JamiTheme.preferredMarginSize + ToggleSwitch { + id: startStopToggle - preferredWidth: itemWidth / widthDivisor - buttontextHeightMargin: JamiTheme.buttontextHeightMargin + Layout.fillWidth: true + Layout.leftMargin: JamiTheme.preferredMarginSize + Layout.rightMargin: JamiTheme.preferredMarginSize - secondary: true - color: JamiTheme.buttonTintedBlack - hoveredColor: JamiTheme.buttonTintedBlackHovered - pressedColor: JamiTheme.buttonTintedBlackPressed - text: JamiStrings.logsViewClear - autoAccelerator: true + checked: false + labelText: JamiStrings.logsViewDisplay - onClicked: { - logsText.clear(); - logging = false; - startStopToggle.checked = false; + onSwitchToggled: { + logging = !logging; + if (logging) { + isStopped = false; + root.cancelPressed = false; + monitor(true); + } else { + isStopped = true; root.cancelPressed = true; - UtilsAdapter.logList = []; monitor(false); } } + } - MaterialButton { - id: copyButton + MaterialButton { + id: clearButton + + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: JamiTheme.preferredMarginSize + Layout.bottomMargin: JamiTheme.preferredMarginSize + + preferredWidth: itemWidth / widthDivisor + buttontextHeightMargin: JamiTheme.buttontextHeightMargin + + secondary: true + color: JamiTheme.buttonTintedBlack + hoveredColor: JamiTheme.buttonTintedBlackHovered + pressedColor: JamiTheme.buttonTintedBlackPressed + text: JamiStrings.logsViewClear + autoAccelerator: true + + onClicked: { + logsText.clear(); + logging = false; + startStopToggle.checked = false; + root.cancelPressed = true; + UtilsAdapter.logList = []; + monitor(false); + } + } - Layout.alignment: Qt.AlignHCenter + MaterialButton { + id: copyButton - preferredWidth: itemWidth / widthDivisor - buttontextHeightMargin: JamiTheme.buttontextHeightMargin + Layout.alignment: Qt.AlignHCenter - color: JamiTheme.buttonTintedBlack - hoveredColor: JamiTheme.buttonTintedBlackHovered - pressedColor: JamiTheme.buttonTintedBlackPressed + preferredWidth: itemWidth / widthDivisor + buttontextHeightMargin: JamiTheme.buttontextHeightMargin - secondary: true - text: JamiStrings.logsViewCopy - autoAccelerator: true + color: JamiTheme.buttonTintedBlack + hoveredColor: JamiTheme.buttonTintedBlackHovered + pressedColor: JamiTheme.buttonTintedBlackPressed - onClicked: { - logsText.selectAll(); - logsText.copy(); - logsText.deselect(); - copiedToolTip.open(); - } + secondary: true + text: JamiStrings.logsViewCopy + autoAccelerator: true - ToolTip { - id: copiedToolTip + onClicked: { + logsText.selectAll(); + logsText.copy(); + logsText.deselect(); + copiedToolTip.open(); + } - height: JamiTheme.preferredFieldHeight - TextArea { - text: JamiStrings.logsViewCopied - color: JamiTheme.textColor - } - background: Rectangle { - color: JamiTheme.primaryBackgroundColor - } + ToolTip { + id: copiedToolTip + + height: JamiTheme.preferredFieldHeight + TextArea { + text: JamiStrings.logsViewCopied + color: JamiTheme.textColor + } + background: Rectangle { + color: JamiTheme.primaryBackgroundColor } } + } - MaterialButton { - id: reportButton + MaterialButton { + id: reportButton - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: JamiTheme.preferredMarginSize - Layout.bottomMargin: JamiTheme.preferredMarginSize - Layout.rightMargin: JamiTheme.preferredMarginSize + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: JamiTheme.preferredMarginSize + Layout.bottomMargin: JamiTheme.preferredMarginSize + Layout.rightMargin: JamiTheme.preferredMarginSize - preferredWidth: itemWidth / widthDivisor - buttontextHeightMargin: JamiTheme.buttontextHeightMargin + preferredWidth: itemWidth / widthDivisor + buttontextHeightMargin: JamiTheme.buttontextHeightMargin - color: JamiTheme.buttonTintedBlack - hoveredColor: JamiTheme.buttonTintedBlackHovered - pressedColor: JamiTheme.buttonTintedBlackPressed - text: JamiStrings.logsViewReport - secondary: true - autoAccelerator: true + color: JamiTheme.buttonTintedBlack + hoveredColor: JamiTheme.buttonTintedBlackHovered + pressedColor: JamiTheme.buttonTintedBlackPressed + text: JamiStrings.logsViewReport + secondary: true + autoAccelerator: true - onClicked: Qt.openUrlExternally("https://jami.net/bugs-and-improvements/") - } + onClicked: Qt.openUrlExternally("https://jami.net/bugs-and-improvements/") } } @@ -235,7 +222,7 @@ Window { font.hintingPreference: Font.PreferNoHinting readOnly: true - color: JamiTheme.blackColor + color: JamiTheme.textColor wrapMode: TextArea.Wrap selectByMouse: true