Follow FishUI colors
This commit is contained in:
parent
6d496e8de2
commit
e55cdb8af4
5 changed files with 92 additions and 11 deletions
78
cmake/FindLibmpv.cmake
Normal file
78
cmake/FindLibmpv.cmake
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2006 Laurent Montel <montel@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2019 Heiko Becker <heirecka@exherbo.org>
|
||||||
|
# SPDX-FileCopyrightText: 2020 Elvis Angelaccio <elvis.angelaccio@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2021 George Florea Bănuș <georgefb899@gmail.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FindLibmpv
|
||||||
|
# ----------
|
||||||
|
#
|
||||||
|
# Find the mpv media player client library.
|
||||||
|
#
|
||||||
|
# Defines the following variables:
|
||||||
|
#
|
||||||
|
# - Libmpv_FOUND
|
||||||
|
# True if it finds the library and include directory
|
||||||
|
#
|
||||||
|
# - Libmpv_INCLUDE_DIRS
|
||||||
|
# The libmpv include dirs for use with target_include_directories
|
||||||
|
#
|
||||||
|
# - Libmpvb_LIBRARIES
|
||||||
|
# The libmpv libraries for use with target_link_libraries()
|
||||||
|
#
|
||||||
|
# - Libmpv_VERSION
|
||||||
|
# The version of the found libmpv
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Defines the following imported target if 'Libmpv_FOUND' is true:
|
||||||
|
#
|
||||||
|
# - Libmpv::Libmpv
|
||||||
|
#
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
|
pkg_search_module(PC_MPV QUIET mpv)
|
||||||
|
|
||||||
|
find_path(Libmpv_INCLUDE_DIRS
|
||||||
|
NAMES client.h
|
||||||
|
PATH_SUFFIXES mpv
|
||||||
|
HINTS ${PC_MPV_INCLUDEDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
find_library(Libmpv_LIBRARIES
|
||||||
|
NAMES mpv
|
||||||
|
HINTS ${PC_MPV_LIBDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(Libmpv_VERSION ${PC_MPV_VERSION})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Libmpv
|
||||||
|
FOUND_VAR
|
||||||
|
Libmpv_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
Libmpv_LIBRARIES
|
||||||
|
Libmpv_INCLUDE_DIRS
|
||||||
|
VERSION_VAR
|
||||||
|
Libmpv_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Libmpv_FOUND AND NOT TARGET Libmpv::Libmpv)
|
||||||
|
add_library(Libmpv::Libmpv UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Libmpv::Libmpv PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Libmpv_LIBRARIES}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Libmpv_INCLUDE_DIRS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(Libmpv_LIBRARIES Libmpv_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
include(FeatureSummary)
|
||||||
|
set_package_properties(Libmpv PROPERTIES
|
||||||
|
URL "https://mpv.io"
|
||||||
|
DESCRIPTION "mpv media player client library"
|
||||||
|
)
|
|
@ -26,10 +26,12 @@ Item {
|
||||||
height: 24
|
height: 24
|
||||||
|
|
||||||
property alias source: _image.source
|
property alias source: _image.source
|
||||||
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.1)
|
property color backgroundColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.secondBackgroundColor, 1.3)
|
||||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
|
: FishUI.Theme.secondBackgroundColor
|
||||||
property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.2)
|
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.secondBackgroundColor, 1.7)
|
||||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
|
: Qt.darker(FishUI.Theme.secondBackgroundColor, 1.2)
|
||||||
|
property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.secondBackgroundColor, 1.4)
|
||||||
|
: Qt.darker(FishUI.Theme.secondBackgroundColor, 1.3)
|
||||||
|
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ Item {
|
||||||
id: _background
|
id: _background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: FishUI.Theme.smallRadius
|
radius: FishUI.Theme.smallRadius
|
||||||
color: _mouseArea.pressed ? pressedColor : _mouseArea.containsMouse ? control.hoveredColor : FishUI.Theme.backgroundColor
|
color: _mouseArea.pressed ? pressedColor : _mouseArea.containsMouse ? control.hoveredColor : control.backgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|
|
@ -92,7 +92,7 @@ Item {
|
||||||
anchors.rightMargin: FishUI.Units.smallSpacing * 1.5
|
anchors.rightMargin: FishUI.Units.smallSpacing * 1.5
|
||||||
anchors.bottomMargin: FishUI.Units.smallSpacing * 1.5
|
anchors.bottomMargin: FishUI.Units.smallSpacing * 1.5
|
||||||
radius: FishUI.Theme.smallRadius
|
radius: FishUI.Theme.smallRadius
|
||||||
color: FishUI.Theme.backgroundColor
|
color: FishUI.Theme.secondBackgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|
|
@ -51,7 +51,8 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: FishUI.Theme.backgroundColor
|
color: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.secondBackgroundColor, 1.3)
|
||||||
|
: FishUI.Theme.secondBackgroundColor
|
||||||
radius: FishUI.Theme.smallRadius
|
radius: FishUI.Theme.smallRadius
|
||||||
z: -1
|
z: -1
|
||||||
}
|
}
|
||||||
|
@ -103,7 +104,8 @@ Item {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: FishUI.Theme.smallRadius
|
radius: FishUI.Theme.smallRadius
|
||||||
color: FishUI.Theme.darkMode ? Qt.darker(FishUI.Theme.backgroundColor, 1.1) : "white"
|
color: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.secondBackgroundColor, 1.7)
|
||||||
|
: FishUI.Theme.secondBackgroundColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: FishUI.Theme.highlightColor
|
border.color: FishUI.Theme.highlightColor
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ FishUI.Window {
|
||||||
title: qsTr("File Manager")
|
title: qsTr("File Manager")
|
||||||
|
|
||||||
header.height: 36 + FishUI.Units.largeSpacing
|
header.height: 36 + FishUI.Units.largeSpacing
|
||||||
background.color: FishUI.Theme.darkMode ? "#262626" : "#F3F4F9"
|
|
||||||
background.opacity: 0.95
|
background.opacity: 0.95
|
||||||
|
|
||||||
FishUI.WindowBlur {
|
FishUI.WindowBlur {
|
||||||
|
@ -73,7 +72,7 @@ FishUI.Window {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
implicitWidth: height
|
implicitWidth: height
|
||||||
source: FishUI.Theme.darkMode ? "qrc:/images/dark/go-previous.svg"
|
source: FishUI.Theme.darkMode ? "qrc:/images/dark/go-previous.svg"
|
||||||
: "qrc:/images/light/go-previous.svg"
|
: "qrc:/images/light/go-previous.svg"
|
||||||
onClicked: _folderPage.goBack()
|
onClicked: _folderPage.goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ FishUI.Window {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
implicitWidth: height
|
implicitWidth: height
|
||||||
source: FishUI.Theme.darkMode ? "qrc:/images/dark/go-next.svg"
|
source: FishUI.Theme.darkMode ? "qrc:/images/dark/go-next.svg"
|
||||||
: "qrc:/images/light/go-next.svg"
|
: "qrc:/images/light/go-next.svg"
|
||||||
onClicked: _folderPage.goForward()
|
onClicked: _folderPage.goForward()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue