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

nmc/2055-Changes to Main window (Icons and header logo) - Stable-3.11 #86

Open
wants to merge 2 commits into
base: stable-3.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@
<file>src/gui/ConflictDelegate.qml</file>
<file>src/gui/ConflictItemFileInfo.qml</file>
<file>src/gui/filedetails/NCInputDateField.qml</file>
<file>src/gui/nmcgui/NMCLogoArea.qml</file>
<file>src/gui/nmcgui/NMCHeaderButton.qml</file>
</qresource>
</RCC>
42 changes: 42 additions & 0 deletions src/gui/nmcgui/NMCHeaderButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (C) 2020 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

Button {
id: root

display: AbstractButton.TextUnderIcon
flat: true
hoverEnabled: Style.hoverEffectsEnabled

icon.width: Style.headerButtonIconSize
icon.height: Style.headerButtonIconSize
icon.color: Style.nmcBrowserButtonColor

background: Rectangle {
color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : "transparent"
opacity: 0.2
}
}
38 changes: 38 additions & 0 deletions src/gui/nmcgui/NMCLogoArea.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2022 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 QtQuick.Layouts 1.15

import Style 1.0

Rectangle{
id: root
height: Style.nmcTrayWindowHeaderHeight
color: Style.ncBlue

Image {
source: Style.nmcLogoMagenta
fillMode: Image.PreserveAspectFit

anchors.topMargin: Style.nmcTopBottomHeaderMargin
anchors.bottomMargin: Style.nmcTopBottomHeaderMargin
anchors.left: root.left
anchors.top: root.top
anchors.bottom: root.bottom
anchors.leftMargin: Style.nmcTrayWindowHeaderLeftMargin
}
}
3 changes: 2 additions & 1 deletion src/gui/tray/TrayFoldersMenuButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.0
import Style 1.0
import "../nmcgui"

HeaderButton {
NMCHeaderButton {
id: root

implicitWidth: contentItem.implicitWidth
Expand Down
Loading