Skip to content

Commit

Permalink
Rename projects and files to avoid naming conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
FengZhongShaoNian committed Aug 3, 2024
1 parent abc5039 commit 2dcdb54
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)

project(QAdwaitaDecorations
project(QWhiteSurGtkDecorations
VERSION 0.1.5
DESCRIPTION "Qt Wayland decoration plugin using libadwaita style"
DESCRIPTION "Qt Wayland decoration plugin using WhiteSur-gtk style"
LANGUAGES CXX C)

option(USE_QT6 "Use Qt6 instead of Qt5" OFF)
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# QAdwaitaDecorations
Qt decoration plugin implementing Adwaita-like client-side decorations.
# QWhiteSurGtkDecorations
Qt decoration plugin implementing WhiteSurGTK-like client-side decorations.

This project is modified based on the [QAdwaitaDecorations](https://github.com/FedoraQt/QAdwaitaDecorations) project.

Some of the icon resources used in this project come from [WhiteSur-gtk-theme](https://github.com/vinceliuice/WhiteSur-gtk-theme.git).

## How to compile
This library uses private Qt headers and will likely not be forward nor
Expand All @@ -20,7 +24,7 @@ make && make install
It can be used by setting the QT_WAYLAND_DECORATION environment variable:

```
export QT_WAYLAND_DECORATION=adwaita
export QT_WAYLAND_DECORATION=whitesur-gtk
```

## License
Expand Down
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
qt_add_resources(SOURCES resources.qrc)

set(qadwaitadecorations_SRCS
qadwaitadecorationsplugin.cpp
qadwaitadecorations.cpp
qwhitesurgtkdecorationsplugin.cpp
qwhitesurgtkdecorations.cpp
${SOURCES}
)

add_library(qadwaitadecorations MODULE ${qadwaitadecorations_SRCS})
target_link_libraries(qadwaitadecorations
add_library(qwhitesurgtkdecorations MODULE ${qadwaitadecorations_SRCS})
target_link_libraries(qwhitesurgtkdecorations
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::GuiPrivate
Expand All @@ -19,12 +19,12 @@ target_link_libraries(qadwaitadecorations

if (NOT USE_QT6)
if (${Qt5XkbCommonSupport_FOUND})
target_link_libraries(qadwaitadecorations
target_link_libraries(qwhitesurgtkdecorations
Qt${QT_VERSION_MAJOR}::XkbCommonSupportPrivate
Qt${QT_VERSION_MAJOR}::ThemeSupportPrivate
)
endif()
endif()

install(TARGETS qadwaitadecorations DESTINATION ${QT_PLUGINS_DIR}/wayland-decoration-client)
install(TARGETS qwhitesurgtkdecorations DESTINATION ${QT_PLUGINS_DIR}/wayland-decoration-client)

5 changes: 0 additions & 5 deletions src/qadwaitadecorations.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

#include "qadwaitadecorations.h"
#include "qwhitesurgtkdecorations.h"

#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
#include <QtWaylandClient/private/qwaylandshmbackingstore_p.h>
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions src/qwhitesurgtkdecorations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Keys": [ "whitesur-gtk" ]
}


Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*
*/

#include "qadwaitadecorationsplugin.h"
#include "qadwaitadecorations.h"
#include "qwhitesurgtkdecorationsplugin.h"
#include "qwhitesurgtkdecorations.h"

QWaylandAbstractDecoration *QAdwaitaDecorationsPlugin::create(const QString &system,
const QStringList &paramList)
{
Q_UNUSED(paramList)
if (system == "adwaita" || system == "gnome")
if (system == "whitesur-gtk")
return new QAdwaitaDecorations();
return nullptr;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace QtWaylandClient;
class QAdwaitaDecorationsPlugin : public QWaylandDecorationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "qadwaitadecorations.json")
Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "qwhitesurgtkdecorations.json")
public:
QWaylandAbstractDecoration *create(const QString &system,
const QStringList &paramList) override;
Expand Down

0 comments on commit 2dcdb54

Please sign in to comment.