forked from nextcloud/desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #170 [stable-3.12] nmc/2055-Changes to Main window (Icons and h…
…eader logo)
- Loading branch information
Showing
15 changed files
with
473 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (C) 2024 by Eugen Fischer | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
|
||
import QtQml 2.15 | ||
import QtQml.Models 2.15 | ||
import QtQuick 2.15 | ||
import QtQuick.Window 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
import QtGraphicalEffects 1.15 | ||
|
||
// Custom qml modules are in /theme (and included by resources.qrc) | ||
import Style 1.0 | ||
import com.nextcloud.desktopclient 1.0 | ||
|
||
Item{ | ||
id: rec | ||
|
||
width: 92 | ||
height: Style.nmcTrayWindowHeaderHeight | ||
|
||
signal clickedButton | ||
|
||
property string iconText: "" | ||
property string iconSource: "" | ||
property bool iconHovered: false | ||
|
||
ColumnLayout{ | ||
|
||
spacing: 0 | ||
anchors.centerIn: parent | ||
|
||
Button { | ||
id: button | ||
flat: true | ||
icon.source: rec.iconSource | ||
icon.width: Style.nmcTrayWindowIconWidth | ||
icon.height: Style.nmcTrayWindowIconWidth | ||
|
||
onClicked: { | ||
rec.clickedButton() | ||
} | ||
|
||
background: Rectangle { | ||
color: iconHovered || button.visualFocus ? "black" : "transparent" | ||
opacity: 0.05 | ||
} | ||
Layout.alignment: Qt.AlignHCenter | ||
} | ||
|
||
Text { | ||
width: rec.width | ||
text: rec.iconText | ||
elide: Text.ElideRight | ||
color: Style.nmcTrayWindowHeaderTextColor | ||
font.pixelSize: Style.nmcFontSizeIconText | ||
font.bold: false | ||
leftPadding: 8 | ||
rightPadding: 8 | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (C) 2023 by Eugen Fischer | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
|
||
import QtQml 2.15 | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
import Style 1.0 | ||
|
||
MenuItem { | ||
icon.color: hovered ? Style.ncBlue : Style.ncTextColor | ||
palette.windowText: hovered ? Style.nmcTrayWindowHeaderTextColor : Style.nmcTrayWindowHeaderTextColor | ||
hoverEnabled: true | ||
font.pixelSize: Style.topLinePixelSize | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.