├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── CMakeLists.txt ├── README.md ├── color-scheme ├── CMakeLists.txt ├── HelloDark.colors ├── HelloLight.colors ├── README.md └── preview.png ├── hello_icon.png ├── kstyle ├── CMakeLists.txt ├── animations │ ├── breezeanimation.cpp │ ├── breezeanimation.h │ ├── breezeanimationdata.cpp │ ├── breezeanimationdata.h │ ├── breezeanimations.cpp │ ├── breezeanimations.h │ ├── breezebaseengine.cpp │ ├── breezebaseengine.h │ ├── breezebusyindicatordata.cpp │ ├── breezebusyindicatordata.h │ ├── breezebusyindicatorengine.cpp │ ├── breezebusyindicatorengine.h │ ├── breezedatamap.h │ ├── breezedialdata.cpp │ ├── breezedialdata.h │ ├── breezedialengine.cpp │ ├── breezedialengine.h │ ├── breezeenabledata.cpp │ ├── breezeenabledata.h │ ├── breezegenericdata.cpp │ ├── breezegenericdata.h │ ├── breezeheaderviewdata.cpp │ ├── breezeheaderviewdata.h │ ├── breezeheaderviewengine.cpp │ ├── breezeheaderviewengine.h │ ├── breezescrollbardata.cpp │ ├── breezescrollbardata.h │ ├── breezescrollbarengine.cpp │ ├── breezescrollbarengine.h │ ├── breezespinboxdata.cpp │ ├── breezespinboxdata.h │ ├── breezespinboxengine.cpp │ ├── breezespinboxengine.h │ ├── breezestackedwidgetdata.cpp │ ├── breezestackedwidgetdata.h │ ├── breezestackedwidgetengine.cpp │ ├── breezestackedwidgetengine.h │ ├── breezetabbardata.cpp │ ├── breezetabbardata.h │ ├── breezetabbarengine.cpp │ ├── breezetabbarengine.h │ ├── breezetoolboxengine.cpp │ ├── breezetoolboxengine.h │ ├── breezetransitiondata.cpp │ ├── breezetransitiondata.h │ ├── breezetransitionwidget.cpp │ ├── breezetransitionwidget.h │ ├── breezewidgetstatedata.cpp │ ├── breezewidgetstatedata.h │ ├── breezewidgetstateengine.cpp │ └── breezewidgetstateengine.h ├── config-hello.h.cmake ├── config │ ├── CMakeLists.txt │ ├── Messages.sh │ ├── breezestyleconfig.cpp │ ├── breezestyleconfig.desktop │ ├── breezestyleconfig.h │ ├── breezestyleconfigmodule.cpp │ ├── breezestyleconfigmodule.h │ ├── main.cpp │ ├── sc-apps-breeze-settings.svgz │ └── ui │ │ └── breezestyleconfig.ui ├── debug │ ├── breezewidgetexplorer.cpp │ └── breezewidgetexplorer.h ├── hello.h ├── hello.json ├── hello.kcfg ├── hello.themerc ├── helloaddeventfilter.cpp ├── helloaddeventfilter.h ├── helloblurhelper.cpp ├── helloblurhelper.h ├── helloframeshadow.cpp ├── helloframeshadow.h ├── hellohelper.cpp ├── hellohelper.h ├── hellomdiwindowshadow.cpp ├── hellomdiwindowshadow.h ├── hellomnemonics.cpp ├── hellomnemonics.h ├── hellopropertynames.cpp ├── hellopropertynames.h ├── helloshadowhelper.cpp ├── helloshadowhelper.h ├── hellosplitterproxy.cpp ├── hellosplitterproxy.h ├── hellostyle.cpp ├── hellostyle.h ├── hellostyleconfigdata.kcfgc ├── hellostyleplugin.cpp ├── hellostyleplugin.h ├── hellotileset.cpp ├── hellotileset.h ├── hellowindowmanager.cpp ├── hellowindowmanager.h ├── kstylekde4compat.cpp └── kstylekde4compat.h ├── kwin-effects ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── helloconfig.kcfg ├── hellosettings.kcfg ├── helloshaders.cpp ├── helloshaders.h ├── helloshaders.json ├── screenshots │ ├── after.PNG │ └── before.PNG ├── shaders_110 │ └── helloshaders.frag └── shaders_140 │ └── helloshaders.frag ├── plasma-theme ├── CMakeLists.txt ├── README.md ├── hellodark │ ├── AUTHORS │ ├── LICENSE │ ├── colors │ ├── dialogs │ │ └── background.svg │ ├── metadata.desktop │ └── widgets │ │ ├── action-overlays.svg │ │ ├── actionbutton.svg │ │ ├── arrows.svg │ │ ├── background.svg │ │ ├── bar_meter_horizontal.svg │ │ ├── bar_meter_vertical.svg │ │ ├── busywidget.svg │ │ ├── button.svg │ │ ├── calendar.svg │ │ ├── checkmarks.svg │ │ ├── clock.svg │ │ ├── configuration-icons.svg │ │ ├── containment-controls.svg │ │ ├── glowbar.svg │ │ ├── line.svg │ │ ├── lineedit.svg │ │ ├── listitem.svg │ │ ├── notes.svg │ │ ├── pager.svg │ │ ├── panel-background.svg │ │ ├── scrollbar.svg │ │ ├── scrollwidget.svg │ │ ├── slider.svg │ │ ├── tabbar.svg │ │ ├── tasks.svg │ │ ├── timer.svg │ │ ├── tooltip.svg │ │ └── viewitem.svg └── hellolight │ ├── AUTHORS │ ├── LICENSE │ ├── dialogs │ └── background.svg │ ├── icons │ ├── TeamViewer.svg │ ├── accessories.svg │ ├── akonadi.svg │ ├── akregator.svg │ ├── amarok.svg │ ├── applications.svg │ ├── apport.svg │ ├── audio.svg │ ├── battery.svg │ ├── bookmarks.svg │ ├── cantata.svg │ ├── choqok.svg │ ├── choqok_offline.svg │ ├── computer.svg │ ├── configure.svg │ ├── desktop.svg │ ├── device.svg │ ├── distribute.svg │ ├── document.svg │ ├── drive.svg │ ├── edit.svg │ ├── go.svg │ ├── input.svg │ ├── juk.svg │ ├── kaffeine.svg │ ├── kalarm.svg │ ├── kate.svg │ ├── kdeconnect.svg │ ├── kdf.svg │ ├── keyboard.svg │ ├── kget.svg │ ├── kgpg.svg │ ├── klipper.svg │ ├── kmail.svg │ ├── knotes.svg │ ├── konv_message.svg │ ├── konversation.svg │ ├── kopete.svg │ ├── korgac.svg │ ├── kpackagekit.svg │ ├── kruler.svg │ ├── kteatime.svg │ ├── ktorrent.svg │ ├── kup.svg │ ├── list.svg │ ├── mail.svg │ ├── media.svg │ ├── nepomuk.svg │ ├── network.svg │ ├── notification.svg │ ├── office.svg │ ├── phone.svg │ ├── plasmavault-error.svg │ ├── plasmavault.svg │ ├── preferences.svg │ ├── printer.svg │ ├── qbittorrent.svg │ ├── quassel.svg │ ├── quota.svg │ ├── ring-kde.svg │ ├── slc.svg │ ├── software-updates.svg │ ├── software.svg │ ├── start.svg │ ├── system.svg │ ├── touchpad.svg │ ├── update.svg │ ├── user.svg │ ├── video.svg │ ├── view.svg │ ├── vlc.svg │ ├── wallet.svg │ ├── window.svg │ └── zoom.svg │ ├── metadata.desktop │ └── widgets │ ├── action-overlays.svg │ ├── actionbutton.svg │ ├── arrows.svg │ ├── background.svg │ ├── bar_meter_horizontal.svg │ ├── bar_meter_vertical.svg │ ├── busywidget.svg │ ├── button.svg │ ├── checkmarks.svg │ ├── clock.svg │ ├── configuration-icons.svg │ ├── containment-controls.svg │ ├── notes.svg │ ├── panel-background.svg │ ├── scrollbar.svg │ ├── slider.svg │ ├── tabbar.svg │ ├── timer.svg │ ├── tooltip.svg │ └── viewitem.svg └── window-decoration ├── .gitignore ├── CMakeLists.txt ├── COPYING ├── HelloConfig.cmake.in ├── README.md ├── buttonicons.png ├── colormatching.png ├── gradients.png ├── hello.png ├── hello_icon.png ├── hidpi.png ├── icon.svg ├── kdecoration ├── CMakeLists.txt ├── Messages.sh ├── config-hello.h.cmake ├── config │ ├── helloconfigwidget.cpp │ ├── helloconfigwidget.h │ ├── hellodecorationconfig.desktop │ ├── hellodetectwidget.cpp │ ├── hellodetectwidget.h │ ├── helloexceptiondialog.cpp │ ├── helloexceptiondialog.h │ ├── helloexceptionlistwidget.cpp │ ├── helloexceptionlistwidget.h │ ├── helloexceptionmodel.cpp │ ├── helloexceptionmodel.h │ ├── helloitemmodel.cpp │ ├── helloitemmodel.h │ ├── hellolistmodel.h │ └── ui │ │ ├── about.qrc │ │ ├── helloconfigurationui.ui │ │ ├── hellodetectwidget.ui │ │ ├── helloexceptiondialog.ui │ │ ├── helloexceptionlistwidget.ui │ │ └── hellomod_icon.png ├── hello.h ├── hello.json ├── hellobutton.cpp ├── hellobutton.h ├── hellodecoration.cpp ├── hellodecoration.h ├── helloexceptionlist.cpp ├── helloexceptionlist.h ├── hellosettings.kcfgc ├── hellosettingsdata.kcfg ├── hellosettingsprovider.cpp ├── hellosettingsprovider.h ├── hellosizegrip.cpp └── hellosizegrip.h ├── libhellocommon ├── CMakeLists.txt ├── config-hellocommon.h.cmake ├── helloboxshadowrenderer.cpp └── helloboxshadowrenderer.h ├── low_contrast.png ├── perfectcolor.png ├── regularcolors.png ├── screenshot.png ├── settings.gif ├── sierrabreeze.png └── window_settings.png /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help improve hello 4 | title: "[BUG] " 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior, for example: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Bug inheritance** 24 | If the function or feature is also present on KDE's own Breeze theme, does the same bug occur there as well? 25 | 26 | **Additional files** 27 | If applicable, add screenshots or video to help explain your problem. 28 | 29 | **Additional context** 30 | Add any other context about the problem here, e.g. what Linux distribution you are using 31 | 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[REQ] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the feature you'd like to see** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Additional context** 14 | Add any other context or screenshots about the feature request here. 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | 3 | qt5build/ 4 | build/ 5 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(hello) 3 | 4 | set(WITH_COLOR_SCHEME yes CACHE BOOL "Build with color-scheme") 5 | set(WITH_KSTYLE no CACHE BOOL "Build with kstyle") 6 | set(WITH_KWIN_EFFECTS yes CACHE BOOL "Build with kwin-effects") 7 | set(WITH_PLASMA_THEME yes CACHE BOOL "Build with plasma theme") 8 | set(WITH_WINDOW_DECORATION yes CACHE BOOL "Build with window-decoration") 9 | 10 | if(WITH_COLOR_SCHEME) 11 | add_subdirectory(color-scheme) 12 | endif() 13 | 14 | if(WITH_KSTYLE) 15 | add_subdirectory(kstyle) 16 | endif() 17 | 18 | if(WITH_KWIN_EFFECTS) 19 | add_subdirectory(kwin-effects) 20 | endif() 21 | 22 | if(WITH_PLASMA_THEME) 23 | add_subdirectory(plasma-theme) 24 | endif() 25 | 26 | if(WITH_WINDOW_DECORATION) 27 | add_subdirectory(window-decoration) 28 | endif() 29 | -------------------------------------------------------------------------------- /color-scheme/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(hello-color-scheme) 2 | 3 | set(COLOR_THEMES 4 | HelloDark.colors 5 | HelloLight.colors) 6 | 7 | install(FILES ${COLOR_THEMES} 8 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/color-schemes") 9 | -------------------------------------------------------------------------------- /color-scheme/README.md: -------------------------------------------------------------------------------- 1 | # hello 2 | 3 | A dark and light colorscheme to perfectly match the hello. suite of things. 4 | 5 | ![](preview.png?raw=true) 6 | 7 | ## Installation 8 | 9 | Copy the files to your local directory: 10 | 11 | ``` 12 | ~/.local/share/color-schemes/ 13 | ``` 14 | 15 | They will show up in your color settings afterwards. 16 | -------------------------------------------------------------------------------- /color-scheme/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/color-scheme/preview.png -------------------------------------------------------------------------------- /hello_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/hello_icon.png -------------------------------------------------------------------------------- /kstyle/animations/breezeanimation.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "helloanimation.h" 21 | -------------------------------------------------------------------------------- /kstyle/animations/breezeanimation.h: -------------------------------------------------------------------------------- 1 | #ifndef helloanimation_h 2 | #define helloanimation_h 3 | /************************************************************************* 4 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 5 | * * 6 | * This program is free software; you can redistribute it and/or modify * 7 | * it under the terms of the GNU General Public License as published by * 8 | * the Free Software Foundation; either version 2 of the License, or * 9 | * (at your option) any later version. * 10 | * * 11 | * This program is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program; if not, write to the * 18 | * Free Software Foundation, Inc., * 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 20 | *************************************************************************/ 21 | 22 | #include "hello.h" 23 | 24 | #include 25 | #include 26 | 27 | namespace hello 28 | { 29 | 30 | class Animation: public QPropertyAnimation 31 | { 32 | 33 | Q_OBJECT 34 | 35 | public: 36 | 37 | //* convenience 38 | using Pointer = WeakPointer; 39 | 40 | //* constructor 41 | Animation( int duration, QObject* parent ): 42 | QPropertyAnimation( parent ) 43 | { setDuration( duration ); } 44 | 45 | //* true if running 46 | bool isRunning() const 47 | { return state() == Animation::Running; } 48 | 49 | //* restart 50 | void restart() 51 | { 52 | if( isRunning() ) stop(); 53 | start(); 54 | } 55 | 56 | }; 57 | 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /kstyle/animations/breezeanimationdata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "helloanimationdata.h" 21 | 22 | namespace hello 23 | { 24 | 25 | const qreal AnimationData::OpacityInvalid = -1; 26 | int AnimationData::_steps = 0; 27 | 28 | //_________________________________________________________________________________ 29 | void AnimationData::setupAnimation( const Animation::Pointer& animation, const QByteArray& property ) 30 | { 31 | 32 | // setup animation 33 | animation.data()->setStartValue( 0.0 ); 34 | animation.data()->setEndValue( 1.0 ); 35 | animation.data()->setTargetObject( this ); 36 | animation.data()->setPropertyName( property ); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /kstyle/animations/breezebaseengine.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellobaseengine.h" 21 | -------------------------------------------------------------------------------- /kstyle/animations/breezebusyindicatordata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellobusyindicatordata.h" 21 | -------------------------------------------------------------------------------- /kstyle/animations/breezebusyindicatordata.h: -------------------------------------------------------------------------------- 1 | #ifndef hellobusyindicatordata_h 2 | #define hellobusyindicatordata_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include 24 | 25 | namespace hello 26 | { 27 | 28 | class BusyIndicatorData: public QObject 29 | { 30 | 31 | Q_OBJECT 32 | 33 | public: 34 | 35 | //* constructor 36 | explicit BusyIndicatorData( QObject* parent ): 37 | QObject( parent ), 38 | _animated( false ) 39 | {} 40 | 41 | //* destructor 42 | virtual ~BusyIndicatorData() 43 | {} 44 | 45 | //*@name accessors 46 | //@{ 47 | 48 | //* animated 49 | bool isAnimated() const 50 | { return _animated; } 51 | 52 | //@} 53 | 54 | //*@name modifiers 55 | //@{ 56 | 57 | //* enabled 58 | void setEnabled( bool ) 59 | {} 60 | 61 | //* enabled 62 | void setDuration( int ) 63 | {} 64 | 65 | //* animated 66 | void setAnimated( bool value ) 67 | { _animated = value; } 68 | 69 | //@} 70 | 71 | private: 72 | 73 | //* animated 74 | bool _animated; 75 | 76 | }; 77 | 78 | } 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /kstyle/animations/breezedialdata.h: -------------------------------------------------------------------------------- 1 | #ifndef hellodial_data_h 2 | #define hellodial_data_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "hellowidgetstatedata.h" 24 | 25 | namespace hello 26 | { 27 | 28 | //* dial data 29 | class DialData: public WidgetStateData 30 | { 31 | 32 | Q_OBJECT 33 | 34 | public: 35 | 36 | //* constructor 37 | DialData( QObject* parent, QWidget* target, int ); 38 | 39 | //* event filter 40 | bool eventFilter( QObject*, QEvent* ) override; 41 | 42 | //* subcontrol rect 43 | void setHandleRect( const QRect& rect ) 44 | { _handleRect = rect; } 45 | 46 | //* mouse position 47 | QPoint position() const 48 | { return _position; } 49 | 50 | private: 51 | 52 | //* hoverMoveEvent 53 | void hoverMoveEvent( QObject*, QEvent* ); 54 | 55 | //* hoverMoveEvent 56 | void hoverLeaveEvent( QObject*, QEvent* ); 57 | 58 | //* rect 59 | QRect _handleRect; 60 | 61 | //* mouse position 62 | QPoint _position; 63 | 64 | }; 65 | 66 | } 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /kstyle/animations/breezedialengine.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellodialengine.h" 21 | 22 | #include 23 | 24 | namespace hello 25 | { 26 | 27 | //____________________________________________________________ 28 | bool DialEngine::registerWidget( QWidget* widget, AnimationModes mode ) 29 | { 30 | 31 | // check widget 32 | if( !widget ) return false; 33 | 34 | // only handle hover and focus 35 | if( mode&AnimationHover && !dataMap(AnimationHover).contains( widget ) ) { dataMap(AnimationHover).insert( widget, new DialData( this, widget, duration() ), enabled() ); } 36 | if( mode&AnimationFocus && !dataMap(AnimationFocus).contains( widget ) ) { dataMap(AnimationFocus).insert( widget, new WidgetStateData( this, widget, duration() ), enabled() ); } 37 | 38 | // connect destruction signal 39 | connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)), Qt::UniqueConnection ); 40 | 41 | return true; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /kstyle/animations/breezedialengine.h: -------------------------------------------------------------------------------- 1 | #ifndef hellodialengine_h 2 | #define hellodialengine_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "hellodialdata.h" 24 | #include "hellowidgetstateengine.h" 25 | 26 | namespace hello 27 | { 28 | 29 | //* stores dial hovered action and timeLine 30 | class DialEngine: public WidgetStateEngine 31 | { 32 | 33 | Q_OBJECT 34 | 35 | public: 36 | 37 | //* constructor 38 | explicit DialEngine( QObject* parent ): 39 | WidgetStateEngine( parent ) 40 | {} 41 | 42 | //* destructor 43 | virtual ~DialEngine() 44 | {} 45 | 46 | //* register dial 47 | virtual bool registerWidget( QWidget*, AnimationModes ); 48 | 49 | //* control rect 50 | virtual void setHandleRect( const QObject* object, const QRect& rect ) 51 | { 52 | if( DataMap::Value data = this->data( object, AnimationHover ) ) 53 | { static_cast(data.data())->setHandleRect( rect ); } 54 | } 55 | 56 | //* mouse position 57 | virtual QPoint position( const QObject* object ) 58 | { 59 | if( DataMap::Value data = this->data( object, AnimationHover ) ) 60 | { 61 | 62 | return static_cast(data.data())->position(); 63 | 64 | } else return QPoint( -1, -1 ); 65 | } 66 | 67 | }; 68 | 69 | } 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /kstyle/animations/breezeenabledata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "helloenabledata.h" 21 | 22 | namespace hello 23 | { 24 | 25 | //______________________________________________ 26 | bool EnableData::eventFilter( QObject* object, QEvent* event ) 27 | { 28 | 29 | if( !enabled() ) return WidgetStateData::eventFilter( object, event ); 30 | 31 | // check event type 32 | switch( event->type() ) 33 | { 34 | 35 | // enter event 36 | case QEvent::EnabledChange: 37 | { 38 | if( QWidget* widget = qobject_cast( object ) ) 39 | { updateState( widget->isEnabled() ); } 40 | break; 41 | } 42 | 43 | default: break; 44 | 45 | } 46 | 47 | return WidgetStateData::eventFilter( object, event ); 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /kstyle/animations/breezeenabledata.h: -------------------------------------------------------------------------------- 1 | #ifndef helloenable_data_h 2 | #define helloenable_data_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "hellowidgetstatedata.h" 24 | 25 | namespace hello 26 | { 27 | 28 | //* Enable data 29 | class EnableData: public WidgetStateData 30 | { 31 | 32 | Q_OBJECT 33 | 34 | public: 35 | 36 | //* constructor 37 | EnableData( QObject* parent, QWidget* target, int duration, bool state = true ): 38 | WidgetStateData( parent, target, duration, state ) 39 | { target->installEventFilter( this ); } 40 | 41 | //* event filter 42 | bool eventFilter( QObject*, QEvent* ) override; 43 | 44 | }; 45 | 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /kstyle/animations/breezegenericdata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellogenericdata.h" 21 | 22 | #include 23 | 24 | namespace hello 25 | { 26 | 27 | //______________________________________________ 28 | GenericData::GenericData( QObject* parent, QWidget* target, int duration ): 29 | AnimationData( parent, target ), 30 | _animation( new Animation( duration, this ) ), 31 | _opacity(0) 32 | { setupAnimation( _animation, "opacity" ); } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /kstyle/animations/breezegenericdata.h: -------------------------------------------------------------------------------- 1 | #ifndef hellogeneric_data_h 2 | #define hellogeneric_data_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "helloanimationdata.h" 24 | #include "helloanimation.h" 25 | 26 | #include 27 | #include 28 | namespace hello 29 | { 30 | 31 | 32 | //* generic data 33 | class GenericData: public AnimationData 34 | { 35 | 36 | Q_OBJECT 37 | 38 | //* declare opacity property 39 | Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity ) 40 | 41 | public: 42 | 43 | //* constructor 44 | GenericData( QObject* parent, QWidget* widget, int duration ); 45 | 46 | //* return animation object 47 | const Animation::Pointer& animation() const 48 | { return _animation; } 49 | 50 | //* duration 51 | void setDuration( int duration ) override 52 | { _animation.data()->setDuration( duration ); } 53 | 54 | //* opacity 55 | qreal opacity() const 56 | { return _opacity; } 57 | 58 | //* opacity 59 | void setOpacity( qreal value ) 60 | { 61 | 62 | value = digitize( value ); 63 | if( _opacity == value ) return; 64 | 65 | _opacity = value; 66 | setDirty(); 67 | 68 | } 69 | 70 | private: 71 | 72 | //* animation handling 73 | Animation::Pointer _animation; 74 | 75 | //* opacity variable 76 | qreal _opacity = 0; 77 | 78 | }; 79 | 80 | } 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /kstyle/animations/breezeheaderviewengine.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "helloheaderviewengine.h" 21 | 22 | #include 23 | 24 | namespace hello 25 | { 26 | 27 | //____________________________________________________________ 28 | bool HeaderViewEngine::registerWidget( QWidget* widget ) 29 | { 30 | 31 | if( !widget ) return false; 32 | 33 | // create new data class 34 | if( !_data.contains( widget ) ) _data.insert( widget, new HeaderViewData( this, widget, duration() ), enabled() ); 35 | 36 | // connect destruction signal 37 | connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)), Qt::UniqueConnection ); 38 | return true; 39 | 40 | } 41 | 42 | //____________________________________________________________ 43 | bool HeaderViewEngine::updateState( const QObject* object, const QPoint& position, bool value ) 44 | { 45 | DataMap::Value data( _data.find( object ) ); 46 | return ( data && data.data()->updateState( position, value ) ); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kstyle/animations/breezespinboxdata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellospinboxdata.h" 21 | 22 | namespace hello 23 | { 24 | 25 | //________________________________________________ 26 | SpinBoxData::SpinBoxData( QObject* parent, QWidget* target, int duration ): 27 | AnimationData( parent, target ) 28 | { 29 | _upArrowData._animation = new Animation( duration, this ); 30 | _downArrowData._animation = new Animation( duration, this ); 31 | setupAnimation( upArrowAnimation(), "upArrowOpacity" ); 32 | setupAnimation( downArrowAnimation(), "downArrowOpacity" ); 33 | } 34 | 35 | //______________________________________________ 36 | bool SpinBoxData::Data::updateState( bool value ) 37 | { 38 | if( _state == value ) return false; 39 | else { 40 | 41 | _state = value; 42 | _animation.data()->setDirection( _state ? Animation::Forward : Animation::Backward ); 43 | if( !_animation.data()->isRunning() ) _animation.data()->start(); 44 | return true; 45 | 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kstyle/animations/breezespinboxengine.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellospinboxengine.h" 21 | 22 | #include 23 | 24 | namespace hello 25 | { 26 | 27 | //____________________________________________________________ 28 | bool SpinBoxEngine::registerWidget( QWidget* widget ) 29 | { 30 | 31 | if( !widget ) return false; 32 | 33 | // create new data class 34 | if( !_data.contains( widget ) ) _data.insert( widget, new SpinBoxData( this, widget, duration() ), enabled() ); 35 | 36 | // connect destruction signal 37 | connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)), Qt::UniqueConnection ); 38 | return true; 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /kstyle/animations/breezestackedwidgetdata.h: -------------------------------------------------------------------------------- 1 | #ifndef hellostackedwidget_datah 2 | #define hellostackedwidget_datah 3 | 4 | ////////////////////////////////////////////////////////////////////////////// 5 | // hellostackedwidgetdata.h 6 | // data container for QStackedWidget transition 7 | // ------------------- 8 | // 9 | // Copyright (c) 2009 Hugo Pereira Da Costa 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to 13 | // deal in the Software without restriction, including without limitation the 14 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 15 | // sell copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 27 | // IN THE SOFTWARE. 28 | ////////////////////////////////////////////////////////////////////////////// 29 | 30 | #include "hellotransitiondata.h" 31 | 32 | #include 33 | 34 | namespace hello 35 | { 36 | 37 | //* generic data 38 | class StackedWidgetData: public TransitionData 39 | { 40 | 41 | Q_OBJECT 42 | 43 | public: 44 | 45 | //* constructor 46 | StackedWidgetData( QObject*, QStackedWidget*, int ); 47 | 48 | protected Q_SLOTS: 49 | 50 | //* initialize animation 51 | bool initializeAnimation() override; 52 | 53 | //* animate 54 | bool animate() override; 55 | 56 | //* finish animation 57 | void finishAnimation(); 58 | 59 | //* called when target is destroyed 60 | void targetDestroyed(); 61 | 62 | private: 63 | 64 | //* target 65 | WeakPointer _target; 66 | 67 | //* current index 68 | int _index; 69 | 70 | }; 71 | 72 | } 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /kstyle/animations/breezestackedwidgetengine.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // hellostackedwidgetengine.cpp 3 | // stores event filters and maps widgets to animations 4 | // ------------------- 5 | // 6 | // Copyright (c) 2009 Hugo Pereira Da Costa 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to 10 | // deal in the Software without restriction, including without limitation the 11 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | // sell copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | // IN THE SOFTWARE. 25 | ////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include "hellostackedwidgetengine.h" 28 | 29 | namespace hello 30 | { 31 | 32 | //____________________________________________________________ 33 | bool StackedWidgetEngine::registerWidget( QStackedWidget* widget ) 34 | { 35 | 36 | if( !widget ) return false; 37 | if( !_data.contains( widget ) ) { _data.insert( widget, new StackedWidgetData( this, widget, duration() ), enabled() ); } 38 | 39 | // connect destruction signal 40 | disconnect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); 41 | connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); 42 | 43 | return true; 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /kstyle/animations/breezestackedwidgetengine.h: -------------------------------------------------------------------------------- 1 | #ifndef hellostackedwidgetengine_h 2 | #define hellostackedwidgetengine_h 3 | 4 | ////////////////////////////////////////////////////////////////////////////// 5 | // hellostackedwidgetengine.h 6 | // stores event filters and maps widgets to animations 7 | // ------------------- 8 | // 9 | // Copyright (c) 2009 Hugo Pereira Da Costa 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to 13 | // deal in the Software without restriction, including without limitation the 14 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 15 | // sell copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 27 | // IN THE SOFTWARE. 28 | ////////////////////////////////////////////////////////////////////////////// 29 | 30 | #include "hellobaseengine.h" 31 | #include "hellodatamap.h" 32 | #include "hellostackedwidgetdata.h" 33 | 34 | namespace hello 35 | { 36 | 37 | //* used for simple widgets 38 | class StackedWidgetEngine: public BaseEngine 39 | { 40 | 41 | Q_OBJECT 42 | 43 | public: 44 | 45 | //* constructor 46 | explicit StackedWidgetEngine( QObject* parent ): 47 | BaseEngine( parent ) 48 | {} 49 | 50 | //* register widget 51 | bool registerWidget( QStackedWidget* ); 52 | 53 | //* duration 54 | void setEnabled( bool value ) override 55 | { 56 | BaseEngine::setEnabled( value ); 57 | _data.setEnabled( value ); 58 | } 59 | 60 | //* duration 61 | void setDuration( int value ) override 62 | { 63 | BaseEngine::setDuration( value ); 64 | _data.setDuration( value ); 65 | } 66 | 67 | public Q_SLOTS: 68 | 69 | //* remove widget from map 70 | bool unregisterWidget( QObject* object ) override 71 | { return _data.unregisterWidget( object ); } 72 | 73 | private: 74 | 75 | //* maps 76 | DataMap _data; 77 | 78 | }; 79 | 80 | } 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /kstyle/animations/breezetoolboxengine.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | 21 | #include "hellotoolboxengine.h" 22 | 23 | namespace hello 24 | { 25 | 26 | //____________________________________________________________ 27 | bool ToolBoxEngine::registerWidget( QWidget* widget ) 28 | { 29 | 30 | if( !widget ) return false; 31 | if( !_data.contains( widget ) ) { _data.insert( widget, new WidgetStateData( this, widget, duration() ), enabled() ); } 32 | 33 | // connect destruction signal 34 | connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)), Qt::UniqueConnection ); 35 | return true; 36 | 37 | } 38 | 39 | //____________________________________________________________ 40 | bool ToolBoxEngine::updateState( const QPaintDevice* object, bool value ) 41 | { 42 | PaintDeviceDataMap::Value data( ToolBoxEngine::data( object ) ); 43 | return ( data && data.data()->updateState( value ) ); 44 | } 45 | 46 | //____________________________________________________________ 47 | bool ToolBoxEngine::isAnimated( const QPaintDevice* object ) 48 | { 49 | 50 | PaintDeviceDataMap::Value data( ToolBoxEngine::data( object ) ); 51 | return ( data && data.data()->animation() && data.data()->animation().data()->isRunning() ); 52 | 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /kstyle/animations/breezetransitiondata.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // hellotransitiondata.cpp 3 | // data container for generic transitions 4 | // ------------------- 5 | // 6 | // Copyright (c) 2009 Hugo Pereira Da Costa 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to 10 | // deal in the Software without restriction, including without limitation the 11 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | // sell copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | // IN THE SOFTWARE. 25 | ////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include "hellotransitiondata.h" 28 | 29 | namespace hello 30 | { 31 | 32 | //_________________________________________________________________ 33 | TransitionData::TransitionData( QObject* parent, QWidget* target, int duration ): 34 | QObject( parent ), 35 | _transition( new TransitionWidget( target, duration ) ) 36 | { _transition.data()->hide(); } 37 | 38 | //_________________________________________________________________ 39 | TransitionData::~TransitionData() 40 | { if( _transition ) _transition.data()->deleteLater(); } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /kstyle/animations/breezewidgetstatedata.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "hellowidgetstatedata.h" 21 | 22 | namespace hello 23 | { 24 | 25 | //______________________________________________ 26 | bool WidgetStateData::updateState( bool value ) 27 | { 28 | if( !_initialized ) 29 | { 30 | 31 | _state = value; 32 | _initialized = true; 33 | return false; 34 | 35 | } else if( _state == value ) { 36 | 37 | return false; 38 | 39 | } else { 40 | 41 | _state = value; 42 | animation().data()->setDirection( _state ? Animation::Forward : Animation::Backward ); 43 | if( !animation().data()->isRunning() ) animation().data()->start(); 44 | return true; 45 | 46 | } 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /kstyle/animations/breezewidgetstatedata.h: -------------------------------------------------------------------------------- 1 | #ifndef hellowidgetstatedata_h 2 | #define hellowidgetstatedata_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "hellogenericdata.h" 24 | 25 | namespace hello 26 | { 27 | 28 | //* handle widget state (hover/focus/enable) changes 29 | class WidgetStateData: public GenericData 30 | { 31 | 32 | Q_OBJECT 33 | 34 | public: 35 | 36 | //* constructor 37 | WidgetStateData( QObject* parent, QWidget* target, int duration, bool state = false ): 38 | GenericData( parent, target, duration ), 39 | _initialized( false ), 40 | _state( state ) 41 | {} 42 | 43 | //* destructor 44 | virtual ~WidgetStateData() 45 | {} 46 | 47 | /** 48 | returns true if hover has Changed 49 | and starts timer accordingly 50 | */ 51 | virtual bool updateState( bool value ); 52 | 53 | private: 54 | 55 | bool _initialized; 56 | bool _state; 57 | 58 | }; 59 | 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /kstyle/config-hello.h.cmake: -------------------------------------------------------------------------------- 1 | /* config-hello.h. Generated by cmake from config-hello.h.cmake */ 2 | 3 | /************************************************************************* 4 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 5 | * * 6 | * This program is free software; you can redistribute it and/or modify * 7 | * it under the terms of the GNU General Public License as published by * 8 | * the Free Software Foundation; either version 2 of the License, or * 9 | * (at your option) any later version. * 10 | * * 11 | * This program is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program; if not, write to the * 18 | * Free Software Foundation, Inc., * 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 20 | *************************************************************************/ 21 | 22 | #ifndef config_hello_h 23 | #define config_hello_h 24 | 25 | /* Define to 1 if hello is compiled against KDE4 */ 26 | #cmakedefine01 hello_USE_KDE4 27 | 28 | /* Define to 1 if QtQuick is available */ 29 | #cmakedefine01 hello_HAVE_QTQUICK 30 | 31 | /* Define to 1 if FrameworkIntegration/Kstyle libraries are found */ 32 | #cmakedefine01 hello_HAVE_KSTYLE 33 | 34 | /* Define to 1 if XCB libraries are found */ 35 | #cmakedefine01 hello_HAVE_X11 36 | 37 | #cmakedefine01 hello_HAVE_KWAYLAND 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kstyle/config/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### configuration plugin 2 | add_definitions(-DTRANSLATION_DOMAIN=\"hello_style_config\") 3 | set(kstyle_hello_config_PART_SRCS hellostyleconfig.cpp) 4 | 5 | if(hello_USE_KDE4) 6 | 7 | kde4_add_kcfg_files(kstyle_hello_config_PART_SRCS ../hellostyleconfigdata.kcfgc) 8 | kde4_add_ui_files(kstyle_hello_config_PART_SRCS ui/hellostyleconfig.ui) 9 | kde4_add_plugin(kstyle_hello_config ${kstyle_hello_config_PART_SRCS}) 10 | 11 | target_link_libraries(kstyle_hello_config ${KDE4_KDEUI_LIBS} ) 12 | install(TARGETS kstyle_hello_config DESTINATION ${PLUGIN_INSTALL_DIR}) 13 | 14 | else() 15 | 16 | set(kstyle_hello_config_PART_SRCS ${kstyle_hello_config_PART_SRCS} hellostyleconfigmodule.cpp) 17 | 18 | kconfig_add_kcfg_files(kstyle_hello_config_PART_SRCS ../hellostyleconfigdata.kcfgc) 19 | set(kstyle_hello_config_PART_FORMS ui/hellostyleconfig.ui) 20 | ki18n_wrap_ui(kstyle_hello_config_PART_FORMS_HEADERS ${kstyle_hello_config_PART_FORMS}) 21 | 22 | add_library(kstyle_hello_config MODULE 23 | ${kstyle_hello_config_PART_SRCS} 24 | ${kstyle_hello_config_PART_FORMS_HEADERS} 25 | ) 26 | 27 | target_link_libraries(kstyle_hello_config Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus) 28 | target_link_libraries(kstyle_hello_config KF5::ConfigCore KF5::ConfigWidgets KF5::I18n) 29 | install(TARGETS kstyle_hello_config DESTINATION ${QT_PLUGIN_INSTALL_DIR}) 30 | install(FILES hellostyleconfig.desktop DESTINATION ${SERVICES_INSTALL_DIR}) 31 | 32 | endif() 33 | 34 | ########### next target ############### 35 | if(NOT hello_USE_KDE4) 36 | 37 | find_package(KF5KCMUtils CONFIG) 38 | set_package_properties(KF5KCMUtils PROPERTIES 39 | DESCRIPTION "KF5 KCM utils Framework" 40 | URL "https://projects.kde.org/projects/frameworks/kcmutils" 41 | TYPE OPTIONAL 42 | PURPOSE "Required for hello-settings5 application to build") 43 | 44 | if( KF5KCMUtils_FOUND ) 45 | 46 | set(hello_settings_SOURCES main.cpp) 47 | add_executable(hello-settings5 ${hello_settings_SOURCES} ) 48 | target_link_libraries(hello-settings5 Qt5::Core Qt5::Gui Qt5::Widgets ) 49 | target_link_libraries(hello-settings5 KF5::I18n KF5::KCMUtils) 50 | 51 | install(TARGETS hello-settings5 ${INSTALL_TARGETS_DEFAULT_ARGS}) 52 | 53 | # icon 54 | ecm_install_icons(ICONS sc-apps-hello-settings.svgz 55 | DESTINATION ${ICON_INSTALL_DIR} 56 | THEME hicolor ) 57 | endif() 58 | endif() 59 | -------------------------------------------------------------------------------- /kstyle/config/Messages.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | $EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp 3 | $XGETTEXT `find . -name \*.cc -o -name \*.cpp -o -name \*.h` -o $podir/hello_style_config.pot 4 | rm -f rc.cpp 5 | -------------------------------------------------------------------------------- /kstyle/config/breezestyleconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef hellostyleconfig_h 2 | #define hellostyleconfig_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "ui_hellostyleconfig.h" 24 | 25 | namespace hello 26 | { 27 | 28 | class StyleConfig: public QWidget, Ui::helloStyleConfig 29 | { 30 | 31 | Q_OBJECT 32 | 33 | public: 34 | 35 | //* constructor 36 | explicit StyleConfig(QWidget*); 37 | 38 | //* destructor 39 | virtual ~StyleConfig() 40 | {} 41 | 42 | Q_SIGNALS: 43 | 44 | //* emitted whenever one option is changed. 45 | void changed(bool); 46 | 47 | public Q_SLOTS: 48 | 49 | //* load setup from config data 50 | void load(); 51 | 52 | //* save current state 53 | void save(); 54 | 55 | //* restore all default values 56 | void defaults(); 57 | 58 | //* reset to saved configuration 59 | void reset(); 60 | 61 | protected Q_SLOTS: 62 | 63 | //* update modified state when option is checked/unchecked 64 | void updateChanged(); 65 | 66 | }; 67 | 68 | } 69 | #endif 70 | -------------------------------------------------------------------------------- /kstyle/config/breezestyleconfigmodule.cpp: -------------------------------------------------------------------------------- 1 | 2 | /************************************************************************* 3 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 19 | *************************************************************************/ 20 | 21 | #include "hellostyleconfigmodule.h" 22 | 23 | #include 24 | 25 | 26 | K_PLUGIN_FACTORY( 27 | helloStyleConfigFactory, 28 | registerPlugin(QStringLiteral("kcmodule")); 29 | ) 30 | 31 | #include "hellostyleconfigmodule.moc" 32 | 33 | namespace hello 34 | { 35 | 36 | //_______________________________________________________________________ 37 | ConfigurationModule::ConfigurationModule(QWidget *parent, const QVariantList &args): 38 | KCModule(parent, args) 39 | { 40 | setLayout(new QVBoxLayout(this)); 41 | layout()->addWidget( m_config = new StyleConfig( this ) ); 42 | connect(m_config, static_cast(&StyleConfig::changed), this, static_cast(&KCModule::changed)); 43 | } 44 | 45 | //_______________________________________________________________________ 46 | void ConfigurationModule::defaults() 47 | { 48 | m_config->defaults(); 49 | KCModule::defaults(); 50 | } 51 | 52 | //_______________________________________________________________________ 53 | void ConfigurationModule::load() 54 | { 55 | m_config->load(); 56 | KCModule::load(); 57 | } 58 | 59 | //_______________________________________________________________________ 60 | void ConfigurationModule::save() 61 | { 62 | m_config->save(); 63 | KCModule::save(); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /kstyle/config/breezestyleconfigmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef hellostyleconfigmodule_h 2 | #define hellostyleconfigmodule_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include "hellostyleconfig.h" 24 | 25 | #include 26 | 27 | namespace hello 28 | { 29 | 30 | //* configuration module 31 | class ConfigurationModule: public KCModule 32 | { 33 | 34 | Q_OBJECT 35 | 36 | public: 37 | ConfigurationModule(QWidget *parent, const QVariantList &args); 38 | 39 | public Q_SLOTS: 40 | 41 | void defaults() override; 42 | void load() override; 43 | void save() override; 44 | 45 | private: 46 | 47 | //* configuration 48 | StyleConfig* m_config; 49 | 50 | }; 51 | 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /kstyle/config/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // helloanimationconfigitem.h 3 | // animation configuration item 4 | // ------------------- 5 | // 6 | // Copyright (c) 2010 Hugo Pereira Da Costa 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to 10 | // deal in the Software without restriction, including without limitation the 11 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | // sell copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | // IN THE SOFTWARE. 25 | ////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | #include 33 | 34 | //__________________________________________ 35 | int main(int argc, char *argv[]) 36 | { 37 | KLocalizedString::setApplicationDomain("hello_style_config"); 38 | 39 | QApplication app( argc, argv ); 40 | app.setApplicationName( i18n( "hello Settings" ) ); 41 | app.setWindowIcon( QIcon::fromTheme( QStringLiteral( "hello-settings" ) ) ); 42 | 43 | KCMultiDialog dialog; 44 | dialog.setWindowTitle( i18n( "hello Settings" ) ); 45 | dialog.addModule( QStringLiteral( "hellostyleconfig" ) ); 46 | dialog.addModule( QStringLiteral( "hellodecorationconfig" ) ); 47 | dialog.show(); 48 | 49 | foreach( auto child, dialog.findChildren() ) 50 | { 51 | child->adjustSize(); 52 | child->viewport()->adjustSize(); 53 | } 54 | 55 | return app.exec(); 56 | } 57 | -------------------------------------------------------------------------------- /kstyle/config/sc-apps-breeze-settings.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/kstyle/config/sc-apps-breeze-settings.svgz -------------------------------------------------------------------------------- /kstyle/debug/breezewidgetexplorer.h: -------------------------------------------------------------------------------- 1 | #ifndef hellowidgetexplorer_h 2 | #define hellowidgetexplorer_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | namespace hello 30 | { 31 | 32 | //* print widget's and parent's information on mouse click 33 | class WidgetExplorer: public QObject 34 | { 35 | 36 | Q_OBJECT 37 | 38 | public: 39 | 40 | //* constructor 41 | explicit WidgetExplorer( QObject* ); 42 | 43 | //* enable 44 | bool enabled() const; 45 | 46 | //* enable 47 | void setEnabled( bool ); 48 | 49 | //* widget rects 50 | void setDrawWidgetRects( bool value ) 51 | { _drawWidgetRects = value; } 52 | 53 | //* event filter 54 | bool eventFilter( QObject*, QEvent* ) override; 55 | 56 | protected: 57 | 58 | //* event type 59 | QString eventType( const QEvent::Type& ) const; 60 | 61 | //* print widget information 62 | QString widgetInformation( const QWidget* ) const; 63 | 64 | private: 65 | 66 | //* enable state 67 | bool _enabled = false; 68 | 69 | //* widget rects 70 | bool _drawWidgetRects = false; 71 | 72 | //* map event types to string 73 | QMap _eventTypes; 74 | 75 | }; 76 | 77 | } 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /kstyle/hello.json: -------------------------------------------------------------------------------- 1 | { "Keys": [ "hello" ] } 2 | -------------------------------------------------------------------------------- /kstyle/helloaddeventfilter.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | #include "helloaddeventfilter.h" 21 | -------------------------------------------------------------------------------- /kstyle/helloaddeventfilter.h: -------------------------------------------------------------------------------- 1 | #ifndef helloaddeventfilter_h 2 | #define helloaddeventfilter_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include 24 | #include 25 | 26 | namespace hello 27 | { 28 | 29 | class AddEventFilter: public QObject 30 | { 31 | 32 | Q_OBJECT 33 | 34 | public: 35 | 36 | //* constructor 37 | AddEventFilter(): 38 | QObject() 39 | {} 40 | 41 | //* event filter 42 | /** blocks all AddChild events */ 43 | bool eventFilter( QObject*, QEvent* event ) override 44 | { return event->type() == QEvent::ChildAdded; } 45 | 46 | }; 47 | 48 | } 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /kstyle/helloblurhelper.h: -------------------------------------------------------------------------------- 1 | #ifndef helloblurhelper_h 2 | #define helloblurhelper_h 3 | 4 | ////////////////////////////////////////////////////////////////////////////// 5 | // helloblurhelper.h 6 | // handle regions passed to kwin for blurring 7 | // ------------------- 8 | // 9 | // Copyright (C) 2018 Alex Nemeth 10 | // 11 | // Largely rewritten from Oxygen widget style 12 | // Copyright (C) 2007 Thomas Luebking 13 | // Copyright (c) 2010 Hugo Pereira Da Costa 14 | // 15 | // Permission is hereby granted, free of charge, to any person obtaining a copy 16 | // of this software and associated documentation files (the "Software"), to 17 | // deal in the Software without restriction, including without limitation the 18 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 19 | // sell copies of the Software, and to permit persons to whom the Software is 20 | // furnished to do so, subject to the following conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be included in 23 | // all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 30 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 31 | // IN THE SOFTWARE. 32 | ////////////////////////////////////////////////////////////////////////////// 33 | 34 | #include "hello.h" 35 | #include "hellohelper.h" 36 | 37 | #include 38 | #include 39 | 40 | #if hello_HAVE_X11 41 | #include 42 | #endif 43 | 44 | namespace hello 45 | { 46 | class BlurHelper: public QObject 47 | { 48 | Q_OBJECT 49 | 50 | public: 51 | 52 | //! constructor 53 | BlurHelper( QObject* ); 54 | 55 | //! register widget 56 | void registerWidget( QWidget* ); 57 | 58 | //! register widget 59 | void unregisterWidget( QWidget* ); 60 | 61 | //! event filter 62 | bool eventFilter( QObject*, QEvent* ) override; 63 | 64 | protected: 65 | 66 | //! install event filter to object, in a unique way 67 | void addEventFilter( QObject* object ) 68 | { 69 | object->removeEventFilter( this ); 70 | object->installEventFilter( this ); 71 | } 72 | 73 | //! update blur regions for given widget 74 | void update( QWidget* ) const; 75 | 76 | }; 77 | 78 | } 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /kstyle/hellomnemonics.h: -------------------------------------------------------------------------------- 1 | #ifndef hellomnemonics_h 2 | #define hellomnemonics_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "hellostyleconfigdata.h" 28 | 29 | namespace hello 30 | { 31 | 32 | class Mnemonics: public QObject 33 | { 34 | 35 | Q_OBJECT 36 | 37 | public: 38 | 39 | //* constructor 40 | explicit Mnemonics( QObject* parent ): 41 | QObject( parent ) 42 | {} 43 | 44 | //* set mode 45 | void setMode( int ); 46 | 47 | //* event filter 48 | bool eventFilter( QObject*, QEvent* ) override; 49 | 50 | //* true if mnemonics are enabled 51 | bool enabled() const 52 | { return _enabled; } 53 | 54 | //* alignment flag 55 | int textFlags() const 56 | { return _enabled ? Qt::TextShowMnemonic : Qt::TextHideMnemonic; } 57 | 58 | protected: 59 | 60 | //* set enable state 61 | void setEnabled( bool ); 62 | 63 | private: 64 | 65 | //* enable state 66 | bool _enabled = true; 67 | 68 | }; 69 | 70 | } 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /kstyle/hellopropertynames.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | 21 | #include "hellopropertynames.h" 22 | 23 | namespace hello 24 | { 25 | 26 | const char PropertyNames::noAnimations[] = "_kde_no_animations"; 27 | const char PropertyNames::noWindowGrab[] = "_kde_no_window_grab"; 28 | const char PropertyNames::netWMForceShadow[] = "_KDE_NET_WM_FORCE_SHADOW"; 29 | const char PropertyNames::netWMSkipShadow[] = "_KDE_NET_WM_SKIP_SHADOW"; 30 | const char PropertyNames::sidePanelView[] = "_kde_side_panel_view"; 31 | const char PropertyNames::toolButtonAlignment[] = "_kde_toolButton_alignment"; 32 | const char PropertyNames::menuTitle[] = "_hello_toolButton_menutitle"; 33 | const char PropertyNames::alteredBackground[] = "_hello_altered_background"; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /kstyle/hellopropertynames.h: -------------------------------------------------------------------------------- 1 | #ifndef hellopropertynames_h 2 | #define hellopropertynames_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | 24 | namespace hello 25 | { 26 | 27 | struct PropertyNames 28 | { 29 | static const char noAnimations[]; 30 | static const char noWindowGrab[]; 31 | static const char netWMForceShadow[]; 32 | static const char netWMSkipShadow[]; 33 | static const char sidePanelView[]; 34 | static const char toolButtonAlignment[]; 35 | static const char menuTitle[]; 36 | static const char alteredBackground[]; 37 | }; 38 | 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /kstyle/hellostyleconfigdata.kcfgc: -------------------------------------------------------------------------------- 1 | File=hello.kcfg 2 | ClassName=StyleConfigData 3 | NameSpace=hello 4 | Singleton=true 5 | Mutators=true 6 | GlobalEnums=true 7 | -------------------------------------------------------------------------------- /kstyle/hellostyleplugin.cpp: -------------------------------------------------------------------------------- 1 | 2 | /************************************************************************* 3 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 19 | *************************************************************************/ 20 | 21 | #include "hellostyleplugin.h" 22 | #include "hellostyle.h" 23 | 24 | #include 25 | 26 | #if QT_VERSION < 0x050000 27 | Q_EXPORT_PLUGIN2( hello-qt, hello::StylePlugin ) 28 | #endif 29 | 30 | namespace hello 31 | { 32 | 33 | //_________________________________________________ 34 | QStyle* StylePlugin::create( const QString &key ) 35 | { 36 | if( key.toLower() == QStringLiteral( "hello" ) ) 37 | { 38 | return new Style; 39 | } 40 | return nullptr; 41 | } 42 | 43 | //_________________________________________________ 44 | QStringList StylePlugin::keys() const 45 | { return QStringList( QStringLiteral( "hello" ) ); } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /kstyle/hellostyleplugin.h: -------------------------------------------------------------------------------- 1 | #ifndef hellostyleplugin_h 2 | #define hellostyleplugin_h 3 | 4 | /************************************************************************* 5 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 2 of the License, or * 10 | * (at your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 | * GNU General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU General Public License * 18 | * along with this program; if not, write to the * 19 | * Free Software Foundation, Inc., * 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 21 | *************************************************************************/ 22 | 23 | #include 24 | 25 | namespace hello 26 | { 27 | 28 | class StylePlugin : public QStylePlugin 29 | { 30 | 31 | Q_OBJECT 32 | 33 | #if QT_VERSION >= 0x050000 34 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "hello.json" ) 35 | #endif 36 | 37 | public: 38 | 39 | //* constructor 40 | explicit StylePlugin(QObject *parent = nullptr): 41 | QStylePlugin(parent) 42 | {} 43 | 44 | //* returns list of valid keys 45 | QStringList keys() const; 46 | 47 | //* create style 48 | QStyle* create( const QString& ) override; 49 | 50 | }; 51 | 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /kstyle/kstylekde4compat.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Copyright (C) 2015 by David Edmundson * 3 | * * 4 | * This program is free software; you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation; either version 2 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with this program; if not, write to the * 16 | * Free Software Foundation, Inc., * 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 18 | *************************************************************************/ 19 | 20 | /** 21 | * This class copies the features of KF5's KStyle for use in KDE4 only 22 | * 23 | * kdelibs4 also has a KStyle class but this isn't a 1-1 mapping and 24 | * provides a lot of features we do not want 25 | */ 26 | 27 | #ifndef KSTYLE_KDE4_COMPAT_H 28 | #define KSTYLE_KDE4_COMPAT_H 29 | 30 | #include 31 | #include 32 | 33 | class KStyleKDE4Compat : public QCommonStyle 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | 39 | KStyleKDE4Compat(); 40 | ~KStyleKDE4Compat(); 41 | virtual int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *returnData) const; 42 | 43 | protected: 44 | 45 | StyleHint newStyleHint(const QString &element); 46 | ControlElement newControlElement(const QString &element); 47 | SubElement newSubElement(const QString &element); 48 | 49 | private: 50 | 51 | QHash styleElements; 52 | int hintCounter; 53 | int controlCounter; 54 | int subElementCounter; 55 | 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /kwin-effects/.gitignore: -------------------------------------------------------------------------------- 1 | qt5build/ 2 | .vscode/ -------------------------------------------------------------------------------- /kwin-effects/README.md: -------------------------------------------------------------------------------- 1 | # hello shaders 2 | 3 | This KWin effect is the perfect companion for the "hello." KWin window decoration; it rounds the corners of all applications smoothly and draws a nice, thin accent line on the edge of each window to give it that little special something. 4 | 5 | # Dependencies 6 | Debian based (Ubuntu, Kubuntu, KDE Neon): 7 | ``` 8 | sudo apt install git pkg-config cmake g++ gettext extra-cmake-modules qttools5-dev libqt5x11extras5-dev libkf5configwidgets-dev libkf5crash-dev libkf5globalaccel-dev libkf5kio-dev libkf5notifications-dev kinit-dev kwin-dev 9 | ``` 10 | Fedora based: 11 | ``` 12 | sudo dnf install git cmake gcc-c++ extra-cmake-modules qt5-qttools-devel qt5-qttools-static qt5-qtx11extras-devel kf5-kconfigwidgets-devel kf5-kcrash-devel kf5-kguiaddons-devel kf5-kglobalaccel-devel kf5-kio-devel kf5-ki18n-devel kf5-knotifications-devel kf5-kinit-devel kwin-devel qt5-qtbase-devel libepoxy-devel 13 | ``` 14 | 15 | # Installation 16 | Clone the repository and change into the new directory: 17 | ``` 18 | git clone https://github.com/n4n0GH/hello/ && cd hello/kwin-effects 19 | ``` 20 | Run all necessary commands to prepare the compilation: 21 | ``` 22 | mkdir qt5build; cd qt5build; cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DQT5BUILD=ON 23 | ``` 24 | Start the compilation and installation process: 25 | ``` 26 | make && sudo make install && (kwin_x11 --replace &) 27 | ``` 28 | 29 | # Using it 30 | This plugin will activate by default once it's installed. You can turn it on and off and change settings in the "Desktop Effects" module inside your system settings. 31 | -------------------------------------------------------------------------------- /kwin-effects/helloconfig.kcfg: -------------------------------------------------------------------------------- 1 | File=hellosettings.kcfg 2 | ClassName=HelloConfig 3 | NameSpace=KWin 4 | Singleton=true 5 | Mutators=true -------------------------------------------------------------------------------- /kwin-effects/hellosettings.kcfg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 5 10 | 0 11 | 9 12 | 13 | 14 | -------------------------------------------------------------------------------- /kwin-effects/helloshaders.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2015 Robert Metsäranta 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; see the file COPYING. if not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef HELLOSHADERS_H 21 | #define HELLOSHADERS_H 22 | 23 | #include 24 | 25 | namespace KWin { class GLTexture; } 26 | 27 | class Q_DECL_EXPORT HelloShadersEffect : public KWin::Effect 28 | { 29 | // Q_OBJECT 30 | public: 31 | HelloShadersEffect(); 32 | ~HelloShadersEffect(); 33 | 34 | static bool supported(); 35 | static bool enabledByDefault(); 36 | 37 | void setRoundness(const int r); 38 | void genMasks(); 39 | void genRect(); 40 | 41 | void fillRegion(const QRegion ®, const QColor &c); 42 | 43 | void reconfigure(ReconfigureFlags flags); 44 | void prePaintWindow(KWin::EffectWindow* w, KWin::WindowPrePaintData& data, int time); 45 | void paintWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data); 46 | void windowMaximizedStart(KWin::EffectWindow *w); 47 | void windowMaximizedStateChanged(KWin::EffectWindow *w, bool horizontal, bool vertical); 48 | virtual int requestedEffectChainPosition() const { return 100; } 49 | 50 | private: 51 | enum { TopLeft = 0, TopRight, BottomRight, BottomLeft, NTex }; 52 | KWin::GLTexture *m_tex[NTex]; 53 | KWin::GLTexture *m_rect[NTex]; 54 | int m_size, m_rSize, m_alpha; 55 | QSize m_corner; 56 | QRegion m_updateRegion; 57 | KWin::EffectWindow *applyEffect; 58 | KWin::GLShader *m_shader; 59 | }; 60 | 61 | #endif //HELLOSHADERS_H 62 | 63 | -------------------------------------------------------------------------------- /kwin-effects/helloshaders.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Authors": [ 4 | { 5 | "Email": "n4n0@tuta.io", 6 | "Name": "n4n0" 7 | } 8 | ], 9 | "Category": "Appearance", 10 | "Dependencies": [ 11 | ], 12 | "Description": "Rounds the corners of all applications smoothly and draws a nice, thin accent line on the edge of each window to give it that little special something.", 13 | "EnabledByDefault": true, 14 | "Icon": "", 15 | "Id": "kwin4_effect_helloshaders", 16 | "License": "GPL", 17 | "Name": "hello shaders", 18 | "ServiceTypes": [ 19 | "KWin/Effect" 20 | ], 21 | "Version": "git" 22 | }, 23 | "org.kde.kwin.effect": { 24 | "video": "", 25 | "exclusiveGroup": "", 26 | "enabledByDefaultMethod": true 27 | }, 28 | "X-KDE-Ordering": "5", 29 | "X-Plasma-API": "", 30 | "X-Plasma-MainScript": "" 31 | } 32 | -------------------------------------------------------------------------------- /kwin-effects/screenshots/after.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/kwin-effects/screenshots/after.PNG -------------------------------------------------------------------------------- /kwin-effects/screenshots/before.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/kwin-effects/screenshots/before.PNG -------------------------------------------------------------------------------- /kwin-effects/shaders_110/helloshaders.frag: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | uniform sampler2D sampler; 4 | uniform sampler2D corner; 5 | 6 | varying vec2 texcoord0; 7 | 8 | void main() 9 | { 10 | vec4 tex = texture2D(sampler, texcoord0); 11 | vec4 texCorner = texture2D(corner, texcoord0); 12 | tex.a = texCorner.a; 13 | gl_FragColor = tex; 14 | } 15 | -------------------------------------------------------------------------------- /kwin-effects/shaders_140/helloshaders.frag: -------------------------------------------------------------------------------- 1 | #version 140 2 | 3 | uniform sampler2D sampler; 4 | uniform sampler2D corner; 5 | 6 | in vec2 texcoord0; 7 | out vec4 fragColor; 8 | 9 | void main(void) 10 | { 11 | vec4 tex = texture(sampler, texcoord0); 12 | vec4 texCorner = texture(corner, texcoord0); 13 | tex.a = texCorner.a; 14 | fragColor = tex; 15 | } 16 | -------------------------------------------------------------------------------- /plasma-theme/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(hello-plasma) 2 | 3 | set(THEMES 4 | "hellodark" 5 | "hellolight") 6 | 7 | install(DIRECTORY ${THEMES} 8 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/plasma/desktoptheme") 9 | -------------------------------------------------------------------------------- /plasma-theme/README.md: -------------------------------------------------------------------------------- 1 | # hello Plasma 2 | Complete the hello. desktop experience with this Plasma design, matching the hello. colorschemes. 3 | 4 | ## Installation 5 | Copy the folder to your local Plasma theme directory: 6 | 7 | ``` 8 | ~/.local/share/plasma/desktoptheme 9 | ``` 10 | 11 | The theme can be activated in your system settings in the "Plasma Style" configurator. 12 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/AUTHORS: -------------------------------------------------------------------------------- 1 | ------------------------ PLASMA 5 THEME ------------------------ 2 | Alexey Varfolomeev - https://github.com/varlesh/Arc-Dark-KDE 3 | n4n0 - https://github.com/n4n0GH/hello 4 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/colors: -------------------------------------------------------------------------------- 1 | [ColorEffects:Disabled] 2 | Color=56,56,56 3 | ColorAmount=0 4 | ColorEffect=0 5 | ContrastAmount=0.65000000000000002 6 | ContrastEffect=1 7 | IntensityAmount=0.10000000000000001 8 | IntensityEffect=2 9 | 10 | [ColorEffects:Inactive] 11 | ChangeSelectionColor=true 12 | Color=112,111,110 13 | ColorAmount=0.025000000000000001 14 | ColorEffect=2 15 | ContrastAmount=0.10000000000000001 16 | ContrastEffect=2 17 | Enable=false 18 | IntensityAmount=0 19 | IntensityEffect=0 20 | 21 | [Colors:Button] 22 | BackgroundAlternate=64,69,82 23 | BackgroundNormal=65,72,87 24 | DecorationFocus=49,91,239 25 | DecorationHover=49,91,239 26 | ForegroundActive=61,174,233 27 | ForegroundInactive=102,106,115 28 | ForegroundLink=49,91,239 29 | ForegroundNegative=218,68,83 30 | ForegroundNeutral=246,116,0 31 | ForegroundNormal=211,218,227 32 | ForegroundPositive=39,174,96 33 | ForegroundVisited=49,91,239 34 | 35 | [Colors:Selection] 36 | BackgroundAlternate=29,153,243 37 | BackgroundNormal=49,91,239 38 | DecorationFocus=49,91,239 39 | DecorationHover=49,91,239 40 | ForegroundActive=252,252,252 41 | ForegroundInactive=211,218,227 42 | ForegroundLink=253,188,75 43 | ForegroundNegative=218,68,83 44 | ForegroundNeutral=246,116,0 45 | ForegroundNormal=211,218,227 46 | ForegroundPositive=39,174,96 47 | ForegroundVisited=189,195,199 48 | 49 | [Colors:Tooltip] 50 | BackgroundAlternate=47,52,63 51 | BackgroundNormal=53,57,69 52 | DecorationFocus=49,91,239 53 | DecorationHover=49,91,239 54 | ForegroundActive=61,174,233 55 | ForegroundInactive=102,106,115 56 | ForegroundLink=49,91,239 57 | ForegroundNegative=218,68,83 58 | ForegroundNeutral=246,116,0 59 | ForegroundNormal=211,218,227 60 | ForegroundPositive=39,174,96 61 | ForegroundVisited=49,91,239 62 | 63 | [Colors:View] 64 | BackgroundAlternate=64,69,82 65 | BackgroundNormal=64,69,82 66 | DecorationFocus=49,91,239 67 | DecorationHover=49,91,239 68 | ForegroundActive=61,174,233 69 | ForegroundInactive=102,106,115 70 | ForegroundLink=49,91,239 71 | ForegroundNegative=218,68,83 72 | ForegroundNeutral=246,116,0 73 | ForegroundNormal=211,218,227 74 | ForegroundPositive=39,174,96 75 | ForegroundVisited=49,91,239 76 | 77 | [Colors:Window] 78 | BackgroundAlternate=47,52,63 79 | BackgroundNormal=47,52,63 80 | DecorationFocus=49,91,239 81 | DecorationHover=49,91,239 82 | ForegroundActive=61,174,233 83 | ForegroundInactive=102,106,115 84 | ForegroundLink=49,91,239 85 | ForegroundNegative=218,68,83 86 | ForegroundNeutral=246,116,0 87 | ForegroundNormal=211,218,227 88 | ForegroundPositive=39,174,96 89 | ForegroundVisited=49,91,239 90 | 91 | [General] 92 | ColorScheme=Arc Dark 93 | Name=Arc Dark 94 | shadeSortColumn=true 95 | 96 | [KDE] 97 | contrast=4 98 | 99 | [WM] 100 | activeBackground=47,52,63 101 | activeBlend=47,52,63 102 | activeForeground=211,218,227 103 | inactiveBackground=47,52,63 104 | inactiveBlend=47,52,63 105 | inactiveForeground=102,106,115 106 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/metadata.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | X-KDE-ServiceTypes=Plasma/LookAndFeel 3 | Name=hello dark 4 | 5 | X-KDE-PluginInfo-Author=n4n0 6 | X-KDE-PluginInfo-Email=n4n0@tuta.io 7 | X-KDE-PluginInfo-Name=hellodark 8 | X-KDE-PluginInfo-Version= 9 | X-KDE-PluginInfo-Website=https://github.com/n4n0GH/hello 10 | X-KDE-PluginInfo-Category= 11 | X-KDE-PluginInfo-Depends= 12 | X-KDE-PluginInfo-License=CCPL:by-sa 13 | X-KDE-PluginInfo-EnabledByDefault=true 14 | 15 | X-KPackage-Dependencies=kns://colorschemes.knsrc/api.kde-look.org/1336584 16 | 17 | [Settings] 18 | FallbackTheme=hellolight 19 | 20 | [ContrastEffect] 21 | enabled=false 22 | contrast=0.2 23 | intensity=0.4 24 | saturation=1.7 25 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/widgets/arrows.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/widgets/checkmarks.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /plasma-theme/hellodark/widgets/line.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/AUTHORS: -------------------------------------------------------------------------------- 1 | ------------------------ PLASMA 5 THEME ------------------------ 2 | Alexey Varfolomeev - https://github.com/varlesh 3 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/TeamViewer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/accessories.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/akonadi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/akregator.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/amarok.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/applications.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/bookmarks.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/cantata.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/choqok.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/choqok_offline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/configure.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/desktop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/distribute.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/drive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/juk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kaffeine.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kalarm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kdeconnect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kdf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/keyboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kget.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kgpg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/klipper.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/knotes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/konv_message.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 45 | 47 | 52 | 53 | 55 | 62 | 67 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/konversation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kruler.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kteatime.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/ktorrent.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/kup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/nepomuk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/office.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/plasmavault.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/printer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/qbittorrent.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/ring-kde.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/slc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/touchpad.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/view.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/vlc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/icons/zoom.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/metadata.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | X-KDE-ServiceTypes=Plasma/LookAndFeel 3 | Name=hello light 4 | 5 | X-KDE-PluginInfo-Author=n4n0 6 | X-KDE-PluginInfo-Email=n4n0@tuta.io 7 | X-KDE-PluginInfo-Name=hellolight 8 | X-KDE-PluginInfo-Version= 9 | X-KDE-PluginInfo-Website=https://github.com/n4n0GH/hello 10 | X-KDE-PluginInfo-Category= 11 | X-KDE-PluginInfo-Depends= 12 | X-KDE-PluginInfo-License=CCPL:by-sa 13 | X-KDE-PluginInfo-EnabledByDefault=true 14 | 15 | X-KPackage-Dependencies=kns://colorschemes.knsrc/api.kde-look.org/1336584 16 | 17 | X-KDE-fallbackPackage=org.kde.breeze.desktop 18 | 19 | [ContrastEffect] 20 | enabled=false 21 | contrast=0.2 22 | intensity=0.4 23 | saturation=1.7 24 | -------------------------------------------------------------------------------- /plasma-theme/hellolight/widgets/checkmarks.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /window-decoration/.gitignore: -------------------------------------------------------------------------------- 1 | # QTCreator project files 2 | hello.cflags 3 | hello.config 4 | hello.creator 5 | hello.creator.user 6 | hello.cxxflags 7 | hello.files 8 | hello.includes 9 | 10 | # KDevelop bs 11 | hello.kdev4 12 | 13 | # build folder 14 | build/ 15 | -------------------------------------------------------------------------------- /window-decoration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(hello) 2 | set(PROJECT_VERSION "5.16.5") 3 | set(PROJECT_VERSION_MAJOR 5) 4 | 5 | cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) 6 | 7 | include(GenerateExportHeader) 8 | include(WriteBasicConfigVersionFile) 9 | include(FeatureSummary) 10 | 11 | 12 | find_package(ECM 0.0.9 REQUIRED NO_MODULE) 13 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake) 14 | 15 | include(ECMInstallIcons) 16 | include(KDEInstallDirs) 17 | include(KDECMakeSettings) 18 | include(KDECompilerSettings NO_POLICY_SCOPE) 19 | 20 | find_package(KDecoration2 REQUIRED) 21 | add_subdirectory(kdecoration) 22 | 23 | add_subdirectory(libhellocommon) 24 | 25 | find_package(KF5Package CONFIG REQUIRED) 26 | 27 | include(ECMSetupVersion) 28 | ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX HELLO 29 | PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/HelloConfigVersion.cmake" 30 | ) 31 | 32 | # create a Config.cmake and a ConfigVersion.cmake file and install them 33 | set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/hello") 34 | 35 | include(ECMPackageConfigHelpers) 36 | ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/HelloConfig.cmake.in" 37 | "${CMAKE_CURRENT_BINARY_DIR}/HelloConfig.cmake" 38 | PATH_VARS KDE_INSTALL_FULL_DATADIR 39 | INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 40 | ) 41 | 42 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/HelloConfig.cmake" 43 | "${CMAKE_CURRENT_BINARY_DIR}/HelloConfigVersion.cmake" 44 | DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 45 | COMPONENT Devel 46 | ) 47 | 48 | feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) 49 | -------------------------------------------------------------------------------- /window-decoration/HelloConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | set(HELLO_KDECORATION_PLUGIN_ID "org.kde.hello") 4 | -------------------------------------------------------------------------------- /window-decoration/buttonicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/buttonicons.png -------------------------------------------------------------------------------- /window-decoration/colormatching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/colormatching.png -------------------------------------------------------------------------------- /window-decoration/gradients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/gradients.png -------------------------------------------------------------------------------- /window-decoration/hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/hello.png -------------------------------------------------------------------------------- /window-decoration/hello_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/hello_icon.png -------------------------------------------------------------------------------- /window-decoration/hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/hidpi.png -------------------------------------------------------------------------------- /window-decoration/kdecoration/Messages.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | $EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp 3 | $XGETTEXT `find . -name \*.cc -o -name \*.cpp -o -name \*.h` -o $podir/hello_kwin_deco.pot 4 | rm -f rc.cpp 5 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config-hello.h.cmake: -------------------------------------------------------------------------------- 1 | /* config-hello.h. Generated by cmake from config-hello.h.cmake */ 2 | 3 | /************************************************************************* 4 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 5 | * * 6 | * This program is free software; you can redistribute it and/or modify * 7 | * it under the terms of the GNU General Public License as published by * 8 | * the Free Software Foundation; either version 2 of the License, or * 9 | * (at your option) any later version. * 10 | * * 11 | * This program is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program; if not, write to the * 18 | * Free Software Foundation, Inc., * 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 20 | *************************************************************************/ 21 | 22 | #ifndef config_hello_h 23 | #define config_hello_h 24 | 25 | /* Define to 1 if XCB libraries are found */ 26 | #cmakedefine01 HELLO_HAVE_X11 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config/hellodecorationconfig.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=kcmshell5 hellodecorationconfig 3 | Icon=preferences-system-windows 4 | Type=Service 5 | X-KDE-ServiceTypes=KCModule 6 | 7 | X-KDE-Library=org.kde.kdecoration2/hellodecoration 8 | X-KDE-PluginKeyword=kcmodule 9 | X-KDE-ParentApp=kcontrol 10 | X-KDE-Weight=60 11 | 12 | Name=Hello Window Decoration 13 | Name[zh_TW]=Hello 視窗裝飾 14 | Comment=Modify the appearance of window decorations 15 | Comment[ar]=عدّل مظهر زخرفات النّوافذ 16 | Comment[ca]=Modifica l'aparença de les decoracions de les finestres 17 | Comment[ca@valencia]=Modifica l'aparença de les decoracions de les finestres 18 | Comment[cs]=Změnit vzhled dekorace oken 19 | Comment[da]=Ændr vinduesdekorationers udseende 20 | Comment[de]=Das Erscheinungsbild der Fensterdekorationen ändern 21 | Comment[el]=Τροποποίηση εμφάνισης της διακόσμησης παραθύρου 22 | Comment[en_GB]=Modify the appearance of window decorations 23 | Comment[es]=Modificar el aspecto de las decoraciones de las ventanas 24 | Comment[et]=Akna dekoratsioonide välimuse muutmine 25 | Comment[eu]=Aldatu leiho apainduren itxura 26 | Comment[fi]=Muuta ikkunoiden kehysten ulkoasua 27 | Comment[fr]=Modifier l'apparence des décorations des fenêtres 28 | Comment[gl]=Modifica a aparencia da decoración da xanela 29 | Comment[he]=התאם את מראה מסגרות החלונות 30 | Comment[hu]=Az ablakdekorációk megjelenésének módosítása 31 | Comment[ia]=Modifica le apparentia de decorationes de fenestra 32 | Comment[id]=Memodifikasi penampilan dekorasi window 33 | Comment[it]=Modifica l'aspetto delle decorazioni delle finestre 34 | Comment[ko]=창 장식의 모습을 수정합니다 35 | Comment[lt]=Keisti lango dekoracijų išvaizdą 36 | Comment[nb]=Endre utseende for vindusdekorasjoner 37 | Comment[nl]=Wijzig het uiterlijk van vensterdecoraties 38 | Comment[nn]=Endra utsjånad på vindaugspynt 39 | Comment[pl]=Zmień wygląd i wystrój okien 40 | Comment[pt]=Modificar a aparência das decorações das janelas 41 | Comment[pt_BR]=Modifica a aparência das decorações da janela 42 | Comment[ro]=Modifică aspectul decorațiilor pentru ferestre 43 | Comment[ru]=Настройка заголовков окон в стиле Hello 44 | Comment[sk]=Zmena vzhľadu dekorácie okien 45 | Comment[sl]=Spremenite videz okraskov oken 46 | Comment[sr]=Измените изглед декорација прозора 47 | Comment[sr@ijekavian]=Измијените изглед декорација прозора 48 | Comment[sr@ijekavianlatin]=Izmijenite izgled dekoracija prozora 49 | Comment[sr@latin]=Izmenite izgled dekoracija prozora 50 | Comment[sv]=Ändra utseendet hos fönsterdekorationer 51 | Comment[tr]=Pencere dekorasyonlarının görünümünü değiştir 52 | Comment[uk]=Зміна вигляду декорацій вікон 53 | Comment[x-test]=xxModify the appearance of window decorationsxx 54 | Comment[zh_TW]=變更視窗裝飾外觀 55 | X-KDE-Keywords=hello,decoration 56 | X-KDE-Keywords[zh_TW]=hello,decoration 57 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config/helloexceptionmodel.h: -------------------------------------------------------------------------------- 1 | #ifndef helloexceptionmodel_h 2 | #define helloexceptionmodel_h 3 | ////////////////////////////////////////////////////////////////////////////// 4 | // helloexceptionmodel.h 5 | // ------------------- 6 | // 7 | // Copyright (c) 2009 Hugo Pereira Da Costa 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to 11 | // deal in the Software without restriction, including without limitation the 12 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 | // sell copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 25 | // IN THE SOFTWARE. 26 | ////////////////////////////////////////////////////////////////////////////// 27 | 28 | #include "hellolistmodel.h" 29 | #include "hellosettings.h" 30 | #include "hello.h" 31 | 32 | namespace Hello 33 | { 34 | 35 | //* qlistview for object counters 36 | class ExceptionModel: public ListModel 37 | { 38 | 39 | public: 40 | 41 | //* number of columns 42 | enum { nColumns = 3 }; 43 | 44 | //* column type enumeration 45 | enum ColumnType { 46 | ColumnEnabled, 47 | ColumnType, 48 | ColumnRegExp 49 | }; 50 | 51 | 52 | //*@name methods reimplemented from base class 53 | //@{ 54 | 55 | //* return data for a given index 56 | QVariant data(const QModelIndex &index, int role) const override; 57 | 58 | //* header data 59 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 60 | 61 | //* number of columns for a given index 62 | int columnCount(const QModelIndex& ) const override 63 | { return nColumns; } 64 | 65 | //@} 66 | 67 | protected: 68 | 69 | //* sort 70 | void privateSort( int, Qt::SortOrder ) override 71 | {} 72 | 73 | private: 74 | 75 | //* column titles 76 | static const QString m_columnTitles[ nColumns ]; 77 | 78 | }; 79 | 80 | } 81 | #endif 82 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config/helloitemmodel.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // itemmodel.cpp 3 | // ------------------- 4 | // 5 | // Copyright (c) 2009-2010 Hugo Pereira Da Costa 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to 9 | // deal in the Software without restriction, including without limitation the 10 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | // sell copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | // IN THE SOFTWARE. 24 | ////////////////////////////////////////////////////////////////////////////// 25 | 26 | #include "helloitemmodel.h" 27 | 28 | namespace Hello 29 | { 30 | 31 | //_______________________________________________________________ 32 | ItemModel::ItemModel( QObject* parent ): 33 | QAbstractItemModel( parent ) 34 | {} 35 | 36 | //____________________________________________________________ 37 | void ItemModel::sort( int column, Qt::SortOrder order ) 38 | { 39 | 40 | // store column and order 41 | m_sortColumn = column; 42 | m_sortOrder = order; 43 | 44 | // emit signals and call private methods 45 | emit layoutAboutToBeChanged(); 46 | privateSort( column, order ); 47 | emit layoutChanged(); 48 | 49 | } 50 | 51 | //____________________________________________________________ 52 | QModelIndexList ItemModel::indexes( int column, const QModelIndex& parent ) const 53 | { 54 | QModelIndexList out; 55 | int rows( rowCount( parent ) ); 56 | for( int row = 0; row < rows; row++ ) 57 | { 58 | QModelIndex index( this->index( row, column, parent ) ); 59 | if( !index.isValid() ) continue; 60 | out.append( index ); 61 | out += indexes( column, index ); 62 | } 63 | 64 | return out; 65 | 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config/ui/about.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | hello_icon.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/config/ui/hellomod_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/kdecoration/config/ui/hellomod_icon.png -------------------------------------------------------------------------------- /window-decoration/kdecoration/hello.h: -------------------------------------------------------------------------------- 1 | #ifndef hello_h 2 | #define hello_h 3 | 4 | /* 5 | * Copyright 2014 Hugo Pereira Da Costa 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU General Public License as 9 | * published by the Free Software Foundation; either version 2 of 10 | * the License or (at your option) version 3 or any later version 11 | * accepted by the membership of KDE e.V. (or its successor approved 12 | * by the membership of KDE e.V.), which shall act as a proxy 13 | * defined in Section 14 of version 3 of the license. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program. If not, see . 22 | */ 23 | 24 | #include "hellosettings.h" 25 | 26 | #include 27 | #include 28 | 29 | namespace Hello 30 | { 31 | //* convenience typedefs 32 | using InternalSettingsPtr = QSharedPointer; 33 | using InternalSettingsList = QList; 34 | using InternalSettingsListIterator = QListIterator; 35 | 36 | //* metrics 37 | enum Metrics 38 | { 39 | 40 | //* corner radius (pixels) 41 | Frame_FrameRadiusNone = 0, 42 | Frame_FrameRadiusTiny = 3, 43 | Frame_FrameRadius = 5, 44 | Frame_FrameRadiusExtended = 7, 45 | 46 | //* titlebar metrics, in units of small spacing 47 | TitleBar_MarginSmall = 1, 48 | TitleBar_Margin = 3, 49 | TitleBar_MarginLarge = 5, 50 | TitleBar_TopMargin = 3, 51 | TitleBar_BottomMargin = 3, 52 | TitleBar_SideMarginSmall = 2, 53 | TitleBar_SideMargin = 4, 54 | TitleBar_SideMarginLarge = 6, 55 | TitleBar_ButtonSpacingSmall = 2, 56 | TitleBar_ButtonSpacing = 4, 57 | TitleBar_ButtonSpacingLarge = 6, 58 | 59 | // shadow dimensions (pixels) 60 | Shadow_Overlap = 3, 61 | 62 | }; 63 | 64 | //* exception 65 | enum ExceptionMask 66 | { 67 | None = 0, 68 | BorderSize = 1<<4 69 | }; 70 | } 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/hello.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Description": "hello window decoration", 4 | "EnabledByDefault": true, 5 | "Id": "org.kde.hello", 6 | "Name": "hello", 7 | "ServiceTypes": [ 8 | "org.kde.kdecoration2" 9 | ] 10 | }, 11 | "org.kde.kdecoration2": { 12 | "blur": false, 13 | "kcmodule": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/helloexceptionlist.h: -------------------------------------------------------------------------------- 1 | #ifndef helloexceptionlist_h 2 | #define helloexceptionlist_h 3 | 4 | ////////////////////////////////////////////////////////////////////////////// 5 | // helloexceptionlist.h 6 | // window decoration exceptions 7 | // ------------------- 8 | // 9 | // Copyright (c) 2009 Hugo Pereira Da Costa 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to 13 | // deal in the Software without restriction, including without limitation the 14 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 15 | // sell copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 27 | // IN THE SOFTWARE. 28 | ////////////////////////////////////////////////////////////////////////////// 29 | 30 | #include "hellosettings.h" 31 | #include "hello.h" 32 | 33 | #include 34 | 35 | namespace Hello 36 | { 37 | 38 | //! hello exceptions list 39 | class ExceptionList 40 | { 41 | 42 | public: 43 | 44 | //! constructor from list 45 | explicit ExceptionList( const InternalSettingsList& exceptions = InternalSettingsList() ): 46 | _exceptions( exceptions ) 47 | {} 48 | 49 | //! exceptions 50 | const InternalSettingsList& get( void ) const 51 | { return _exceptions; } 52 | 53 | //! read from KConfig 54 | void readConfig( KSharedConfig::Ptr ); 55 | 56 | //! write to kconfig 57 | void writeConfig( KSharedConfig::Ptr ); 58 | 59 | protected: 60 | 61 | //! generate exception group name for given exception index 62 | static QString exceptionGroupName( int index ); 63 | 64 | //! read configuration 65 | static void readConfig( KCoreConfigSkeleton*, KConfig*, const QString& ); 66 | 67 | //! write configuration 68 | static void writeConfig( KCoreConfigSkeleton*, KConfig*, const QString& ); 69 | 70 | private: 71 | 72 | //! exceptions 73 | InternalSettingsList _exceptions; 74 | 75 | }; 76 | 77 | } 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/hellosettings.kcfgc: -------------------------------------------------------------------------------- 1 | File=hellosettingsdata.kcfg 2 | ClassName=InternalSettings 3 | NameSpace=Hello 4 | Singleton=false 5 | Mutators=true 6 | GlobalEnums=true 7 | -------------------------------------------------------------------------------- /window-decoration/kdecoration/hellosettingsprovider.h: -------------------------------------------------------------------------------- 1 | #ifndef hellosettingsprovider_h 2 | #define hellosettingsprovider_h 3 | /* 4 | * Copyright 2014 Hugo Pereira Da Costa 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation; either version 2 of 9 | * the License or (at your option) version 3 or any later version 10 | * accepted by the membership of KDE e.V. (or its successor approved 11 | * by the membership of KDE e.V.), which shall act as a proxy 12 | * defined in Section 14 of version 3 of the license. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | #include "hellodecoration.h" 24 | #include "hellosettings.h" 25 | #include "hello.h" 26 | 27 | #include 28 | 29 | #include 30 | 31 | namespace Hello 32 | { 33 | 34 | class SettingsProvider: public QObject 35 | { 36 | 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | //* destructor 42 | ~SettingsProvider(); 43 | 44 | //* singleton 45 | static SettingsProvider *self(); 46 | 47 | //* internal settings for given decoration 48 | InternalSettingsPtr internalSettings(Decoration *) const; 49 | 50 | public Q_SLOTS: 51 | 52 | //* reconfigure 53 | void reconfigure(); 54 | 55 | private: 56 | 57 | //* contructor 58 | SettingsProvider(); 59 | 60 | //* default configuration 61 | InternalSettingsPtr m_defaultSettings; 62 | 63 | //* exceptions 64 | InternalSettingsList m_exceptions; 65 | 66 | //* config object 67 | KSharedConfigPtr m_config; 68 | 69 | //* singleton 70 | static SettingsProvider *s_self; 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /window-decoration/libhellocommon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################# dependencies ################# 2 | ### Qt/KDE 3 | find_package(Qt5 REQUIRED CONFIG COMPONENTS Widgets) 4 | 5 | ################# configuration ################# 6 | configure_file(config-hellocommon.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-hellocommon.h ) 7 | 8 | ################# hellostyle target ################# 9 | set(hellocommon_LIB_SRCS 10 | helloboxshadowrenderer.cpp 11 | ) 12 | 13 | add_library(hellocommon5 ${hellocommon_LIB_SRCS}) 14 | 15 | generate_export_header(hellocommon5 16 | BASE_NAME hellocommon 17 | EXPORT_FILE_NAME hellocommon_export.h) 18 | 19 | target_link_libraries(hellocommon5 20 | PUBLIC 21 | Qt5::Core 22 | Qt5::Gui) 23 | 24 | set_target_properties(hellocommon5 PROPERTIES 25 | VERSION ${PROJECT_VERSION} 26 | SOVERSION ${PROJECT_VERSION_MAJOR}) 27 | 28 | install(TARGETS hellocommon5 ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) 29 | -------------------------------------------------------------------------------- /window-decoration/libhellocommon/config-hellocommon.h.cmake: -------------------------------------------------------------------------------- 1 | /* config-hellocommon.h. Generated by cmake from config-hellocommon.h.cmake */ 2 | 3 | /************************************************************************* 4 | * Copyright (C) 2014 by Hugo Pereira Da Costa * 5 | * * 6 | * This program is free software; you can redistribute it and/or modify * 7 | * it under the terms of the GNU General Public License as published by * 8 | * the Free Software Foundation; either version 2 of the License, or * 9 | * (at your option) any later version. * 10 | * * 11 | * This program is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program; if not, write to the * 18 | * Free Software Foundation, Inc., * 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 20 | *************************************************************************/ 21 | 22 | #ifndef config_hello_common_h 23 | #define config_hello_common_h 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /window-decoration/low_contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/low_contrast.png -------------------------------------------------------------------------------- /window-decoration/perfectcolor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/perfectcolor.png -------------------------------------------------------------------------------- /window-decoration/regularcolors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/regularcolors.png -------------------------------------------------------------------------------- /window-decoration/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/screenshot.png -------------------------------------------------------------------------------- /window-decoration/settings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/settings.gif -------------------------------------------------------------------------------- /window-decoration/sierrabreeze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/sierrabreeze.png -------------------------------------------------------------------------------- /window-decoration/window_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n4n0GH/hello/87e2b561dd91859b4a6c1f3fe50dfd6f38c249ec/window-decoration/window_settings.png --------------------------------------------------------------------------------