Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native buttons #6980

Merged
merged 41 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d8185e6
Change default Qt quick control style depending on the platform.
camilasan Aug 7, 2024
690ebcc
set the windows native qml style on windows systems
mgallien Aug 7, 2024
a81c60c
let's not make the background color of main dialog be transparent
mgallien Aug 7, 2024
a1a832e
remove any use of custom palette: use the style palette
mgallien Aug 7, 2024
10d6224
Remove component versions under src/gui/tray.
camilasan Aug 7, 2024
d68fa5f
Remove qml component version from import.
camilasan Aug 7, 2024
472f387
Remove component import version from Style.qml.
camilasan Aug 7, 2024
f4c5151
let main dialog have a transparent background again
mgallien Aug 27, 2024
4a8d0cf
add a QQuickStyle fallback: Fusion is fallback style
mgallien Aug 28, 2024
9cecd59
use new QStyleHints::colorScheme feature to use light or dark mode
mgallien Aug 28, 2024
2d08cdb
remove broken system paellete detection within our custom style
mgallien Aug 28, 2024
279c3c3
Change default Qt quick control style depending on the platform.
camilasan Aug 7, 2024
fb17a4b
Replace NCToolTip for ToolTip.
camilasan Aug 27, 2024
0236e88
Fix repeaded call to QQuickStyle::setStyle.
camilasan Aug 28, 2024
3c5066f
Remove custom properties for background and opacity from CustomButton…
camilasan Aug 28, 2024
66e2882
Remove custom properties for text color/hover from CustomButton and N…
camilasan Aug 28, 2024
38f81c0
Fix warning: The current style does not support customization of this…
camilasan Aug 28, 2024
599bbbe
Fix warning: The current style does not support customization of this…
camilasan Aug 28, 2024
d8883d0
Fix warning: The current style does not support customization of this…
camilasan Aug 28, 2024
f612e59
Fix warning: The current style does not support customization of this…
camilasan Aug 28, 2024
24e1606
Fix warning: The current style does not support customization of this…
camilasan Aug 28, 2024
4f7b73c
Fix warning: The current style does not support customization of this…
camilasan Aug 29, 2024
653ecbf
Clean HeaderButton component from customizations.
camilasan Aug 29, 2024
b90d7c0
Remove setting contentsFont, not used anymore in CustomButton.
camilasan Aug 29, 2024
d8acedb
Remove customizations from CustomButton.
camilasan Aug 29, 2024
a4aedd7
NCRadioButton => RadioButton.
camilasan Aug 29, 2024
73bc834
Remove backround customization from ShareeSearchField.
camilasan Aug 29, 2024
0e1d3da
Remove the component version from import.
camilasan Aug 29, 2024
a3ca3bc
Remove duplicated header image.
camilasan Aug 31, 2024
d0e0843
Remove image hover from NCButtonContents and CustomButton.
camilasan Aug 31, 2024
4f92ef3
Remove cutomizations for text color and hover from ActivityActionButton.
camilasan Sep 1, 2024
3ad7964
Remove customizaton for placeholder text color from UnifiedSearchInpu…
camilasan Sep 1, 2024
a91cd69
Remove customization for text color and hover from TextButtonContents.
camilasan Sep 1, 2024
3201e8b
Remove backround rectangle from NCInputTextEdit.
camilasan Sep 1, 2024
1b117d7
Fix font color light/dark of time in ActivityItemContent.
camilasan Sep 3, 2024
5073be1
Remove customizations for hover background from the user menu options.
camilasan Sep 3, 2024
e55dae1
Remove customization for font color from EnforcedPlainTextLabel.
camilasan Sep 3, 2024
6b5041a
Remove background hover customization from UserLine.
camilasan Sep 3, 2024
d05ebc3
Remove more color customizations from Window and TrayFoldersMenuButton.
camilasan Sep 3, 2024
6f13fa6
qrc:/// => image://
camilasan Sep 5, 2024
20ef57c
Fix talk app icon.
camilasan Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<file>src/gui/tray/EnforcedPlainTextLabel.qml</file>
<file>theme/Style/Style.qml</file>
<file>theme/Style/qmldir</file>
<file>src/gui/filedetails/NCRadioButton.qml</file>
<file>src/gui/tray/ListItemLineAndSubline.qml</file>
<file>src/gui/tray/TrayFoldersMenuButton.qml</file>
<file>src/gui/tray/TrayFolderListItem.qml</file>
Expand Down
8 changes: 4 additions & 4 deletions src/gui/BasicComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt5Compat.GraphicalEffects

import Style 1.0
import Style
import "./tray"

ComboBox {
Expand Down
12 changes: 6 additions & 6 deletions src/gui/ConflictDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* for more details.
*/

import QtQml 2.15
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import Style 1.0
import com.nextcloud.desktopclient 1.0
import QtQml
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Style
import com.nextcloud.desktopclient
import "./tray"

Item {
Expand Down
28 changes: 5 additions & 23 deletions src/gui/ConflictItemFileInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQml 2.15
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import Style 1.0
import QtQml
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Style
import "./tray"

Item {
Expand All @@ -31,24 +31,6 @@ Item {
CheckBox {
id: selectItem

palette {
text: Style.ncTextColor
windowText: Style.ncTextColor
buttonText: Style.ncTextColor
brightText: Style.ncTextBrightColor
highlight: Style.lightHover
highlightedText: Style.ncTextColor
light: Style.lightHover
midlight: Style.ncSecondaryTextColor
mid: Style.darkerHover
dark: Style.menuBorder
button: Style.buttonBackgroundColor
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
base: Style.backgroundColor
toolTipBase: Style.backgroundColor
toolTipText: Style.ncTextColor
}

anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter

Expand Down
9 changes: 4 additions & 5 deletions src/gui/EmojiPicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

import Style 1.0
import Style
import com.nextcloud.desktopclient 1.0 as NC
import "./tray"

Expand Down Expand Up @@ -134,7 +134,6 @@ ColumnLayout {
width: parent.width * 0.8
anchors.centerIn: parent
text: qsTr("No recent emojis")
color: palette.midlight
wrapMode: Text.Wrap
font.bold: true
visible: emojiView.count === 0
Expand Down
10 changes: 5 additions & 5 deletions src/gui/ErrorBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import Style 1.0
import Style
import "./tray"

Item {
Expand Down Expand Up @@ -70,7 +70,7 @@ Item {

background: null
icon.color: palette.buttonText
icon.source: "qrc:///client/theme/close.svg"
icon.source: "image://svgimage-custom-color/close.svg"

visible: errorBox.showCloseButton
enabled: visible
Expand Down
8 changes: 4 additions & 4 deletions src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import Style 1.0
import Style
import "./tray"

AbstractButton {
Expand Down
72 changes: 8 additions & 64 deletions src/gui/ResolveConflictsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
* for more details.
*/

import QtQml 2.15
import QtQuick 2.15
import QtQuick.Window 2.15 as QtWindow
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQml.Models 2.15
import Style 1.0
import com.nextcloud.desktopclient 1.0
import QtQml
import QtQuick
import QtQuick.Window as QtWindow
import QtQuick.Layouts
import QtQuick.Controls
import QtQml.Models
import Style
import com.nextcloud.desktopclient
import "./tray"

ApplicationWindow {
Expand All @@ -36,26 +36,6 @@ ApplicationWindow {
minimumHeight: Style.minimumHeightResolveConflictsDialog
title: qsTr('Solve sync conflicts')

// TODO: Rather than setting all these palette colours manually,
// create a custom style and do it for all components globally
palette {
text: Style.ncTextColor
windowText: Style.ncTextColor
buttonText: Style.ncTextColor
brightText: Style.ncTextBrightColor
highlight: Style.lightHover
highlightedText: Style.ncTextColor
light: Style.lightHover
midlight: Style.ncSecondaryTextColor
mid: Style.darkerHover
dark: Style.menuBorder
button: Style.buttonBackgroundColor
window: Style.backgroundColor
base: Style.backgroundColor
toolTipBase: Style.backgroundColor
toolTipText: Style.ncTextColor
}

onClosing: function(close) {
Systray.destroyDialog(self);
close.accepted = true
Expand Down Expand Up @@ -94,24 +74,6 @@ ApplicationWindow {

Layout.fillWidth: true

palette {
text: Style.ncTextColor
windowText: Style.ncTextColor
buttonText: Style.ncTextColor
brightText: Style.ncTextBrightColor
highlight: Style.lightHover
highlightedText: Style.ncTextColor
light: Style.lightHover
midlight: Style.ncSecondaryTextColor
mid: Style.darkerHover
dark: Style.menuBorder
button: Style.buttonBackgroundColor
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
base: Style.backgroundColor
toolTipBase: Style.backgroundColor
toolTipText: Style.ncTextColor
}

text: qsTr('All local versions')

leftPadding: 0
Expand All @@ -130,24 +92,6 @@ ApplicationWindow {

Layout.fillWidth: true

palette {
text: Style.ncTextColor
windowText: Style.ncTextColor
buttonText: Style.ncTextColor
brightText: Style.ncTextBrightColor
highlight: Style.lightHover
highlightedText: Style.ncTextColor
light: Style.lightHover
midlight: Style.ncSecondaryTextColor
mid: Style.darkerHover
dark: Style.menuBorder
button: Style.buttonBackgroundColor
window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox
base: Style.backgroundColor
toolTipBase: Style.backgroundColor
toolTipText: Style.ncTextColor
}

text: qsTr('All server versions')

leftPadding: 0
Expand Down
12 changes: 6 additions & 6 deletions src/gui/UserStatusSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
* for more details.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Dialogs
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Window 2.15
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Window

import com.nextcloud.desktopclient 1.0 as NC
import Style 1.0
import com.nextcloud.desktopclient as NC
import Style
import "./tray"

ColumnLayout {
Expand Down
10 changes: 4 additions & 6 deletions src/gui/UserStatusSelectorButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQuick 2.6
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import Style 1.0
import Style

import "./tray"

Expand Down Expand Up @@ -71,7 +71,6 @@ AbstractButton {

text: root.text
wrapMode: Text.Wrap
color: root.colored ? palette.brightText : palette.buttonText
font.bold: root.primary
}

Expand All @@ -85,7 +84,6 @@ AbstractButton {

text: root.secondaryText
wrapMode: Text.Wrap
color: palette.midlight
visible: root.secondaryText !== ""
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/gui/UserStatusSelectorPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Controls 2.15
import Style 1.0
import QtQuick
import QtQuick.Controls
import Style

import com.nextcloud.desktopclient 1.0 as NC
import com.nextcloud.desktopclient as NC

Page {
id: page
Expand Down
10 changes: 5 additions & 5 deletions src/gui/filedetails/FileActivityView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import com.nextcloud.desktopclient 1.0
import Style 1.0
import com.nextcloud.desktopclient
import Style
import "../tray"

ActivityList {
Expand Down
16 changes: 6 additions & 10 deletions src/gui/filedetails/FileDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* for more details.
*/

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import com.nextcloud.desktopclient 1.0
import Style 1.0
import com.nextcloud.desktopclient
import Style
import "../tray"

Page {
Expand Down Expand Up @@ -139,8 +139,6 @@ Page {
Layout.rightMargin: headerGridLayout.textRightMargin

icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
bgColor: palette.highlight
bgNormalOpacity: 0
toolTipText: qsTr("Dismiss")

visible: root.showCloseButton
Expand All @@ -155,7 +153,6 @@ Page {
Layout.rightMargin: headerGridLayout.textRightMargin

text: `${root.fileDetails.sizeString} · ${root.fileDetails.lastChangedString}`
color: palette.midlight
wrapMode: Text.Wrap
}

Expand All @@ -166,7 +163,6 @@ Page {
Layout.rightMargin: headerGridLayout.textRightMargin

text: root.fileDetails.lockExpireString
color: palette.midlight
wrapMode: Text.Wrap
visible: headerGridLayout.showFileLockedString
}
Expand Down Expand Up @@ -208,7 +204,7 @@ Page {
id: hoverHandler
}

NCToolTip {
ToolTip {
visible: hoverHandler.hovered
text: tagRepeater.fileTagModel.overflowTagsString
}
Expand Down
Loading
Loading