Crystal

Various KDE 1.-4. Styles

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

21
6.8
Description:

This is the port of the famous Crystal kwin decoration theme to KDE 4.x.

For 3.x version see:
http://www.kde-look.org/content/show.php/Crystal?content=13969


Main features:
* Uses compositing features of KDE4 for transparency with ability to use the blur plugin
* Supports grouping/tabbing of windows
* Ability to choose the blending colors of buttons as well as title bar and border size
* Right click on minimize button toggles shade mode
* Middle click on minimize button sends window to below
* Double click on program symbol closes window
* Support for button themes. Basic button theme is included, feel free to swamp me with cool themes
* Can show a tooltip for the caption
* Right click on close button can run kdocker, if installed, to minimize the application to the system tray



-- INSTALL ---------------------
Basic Installation (from the console):
- Step 1 (as user)
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make
- Step 3 (as root)
# make install

If you installed crystal while it was running, you would need to restart kwin for the changes to take effect: kwin --replace
--------------------------------

Feedback and patches well appreciated. ;-)


Follow me on GitHub!
https://github.com/shlusiak/kwin-style-crystal


This version of crystal needs KDE 4.9 or higher!



Have fun,
Sascha Hlusiak
Last changelog:

11 years ago

2.2.1 (KDE 4.9):
* Fix tabbing after window shading


2.2.0 (KDE 4.9 only):
* Use API for KDE 4.9

2.1.1 (KDE 4.8):
* Improved compatibility with KDE 4.8
* Fixed possible glitches without compositing in KDE 4.8
* Draws own shadows


2.1.0:
* Support of KDE's cool window tabbing / grouping feature!!
* Fix working with kdocker >= 4.5, if installed (right click on close button to run)
* Fix glitch of round corners in compositing mode introduced in 2.0.6. Reduced options of round corners to 1 for code simplification.


2.0.6:
* Use Blur effect for transparent borders when kwin-plugin is enabled (needs KDE >= 4.6.0)
* Updated aqua button theme
* New button theme: glass-pill
* Fix some compile warnings


2.0.5:
* Use KDecoration again instead of KDecorationUnstable; hopefully fixes compile problems
* Remove some probably unnecessary redrawing


2.0.4:
* Built-in logos for various distros
* Some experimental transparency support (requires KDE4 compositing)
* Fix not showing shadow in compositing mode (whiteliste abilities now, not blacklist them; thanks to Zarin for pointing that out)

2.0.3:
* Possibility to stretch or scale overlay images
* Fix showing logo on active window only
* Disable caption shadow for inactive windows so it's easier to read
* Work around "hollow" border glitches when using half-maximized states
* Added backported Kubuntu-Hardy button theme (thanks to Kubuntu team)
* Little nicer default settings

2.0.2:
* Adding back button images in configuration dialog
* Set tooltip of decoration to caption right from the beginning
* Creating and using embedtool again to create tiles.h

2.0.1:
* Scrolling through open windows works again (if option is enabled)
* Link to this page in the info dialog
* Minimizing to systray using kdocker works again

2.0.0:
* Initial release of KDE 4.x port

hsarci

9 years ago

I get this error when makeing:

Quote:
hsarci@Hsarci-laptopUB:~/Downloads/crystal-2.0.5/build$ make
[ 7%] Built target embedtool
[ 7%] Built target kwin3_crystal_automoc
[ 14%] Building CXX object client/CMakeFiles/kwin3_crystal.dir/kwin3_crystal_automoc.o
In file included from /home/hsarci/Downloads/crystal-2.0.5/build/client/../../client/crystalbutton.h:27,
from /home/hsarci/Downloads/crystal-2.0.5/build/client/moc_crystalbutton.cpp:10,
from /home/hsarci/Downloads/crystal-2.0.5/build/client/kwin3_crystal_automoc.cpp:4:
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:31:25: error: kdecoration.h: No such file or directory
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:32:32: error: kdecorationfactory.h: No such file or directory
In file included from /home/hsarci/Downloads/crystal-2.0.5/build/client/../../client/crystalbutton.h:27,
from /home/hsarci/Downloads/crystal-2.0.5/build/client/moc_crystalbutton.cpp:10,
from /home/hsarci/Downloads/crystal-2.0.5/build/client/kwin3_crystal_automoc.cpp:4:
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:97: error: expected class-name before ‘{’ token
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:101: error: ISO C++ forbids declaration of ‘KDecoration’ with no type
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:101: error: ‘KDecoration’ declared as a ‘virtual’ field
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:101: error: expected ‘;’ before ‘*’ token
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:103: error: ‘Ability’ has not been declared
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:137: error: expected class-name before ‘{’ token
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:140: error: expected ‘)’ before ‘*’ token
/home/hsarci/Downloads/crystal-2.0.5/client/crystalclient.h:155: error: ‘Position’ does not name a type
make[2]: *** [client/CMakeFiles/kwin3_crystal.dir/kwin3_crystal_automoc.o] Error 1
make[1]: *** [client/CMakeFiles/kwin3_crystal.dir/all] Error 2


any ideas?

Report

WiseLord

9 years ago

Bug is described here:
https://bugs.kde.org/show_bug.cgi?id=200952

And rounding corners doesn't work without little patch (look my post at previous page).

Report

buschmann23

9 years ago

When I try to build packages for openSUSE, I get the following error message:

Quote:
[100%] Building CXX object client/CMakeFiles/kwin3_crystal.dir/crystalclient.o
cd /usr/src/packages/BUILD/crystal-2.0.5/builddir/client && /usr/bin/c++ -DMAKE_KWIN3_CRYSTAL_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DHAVE_CONFIG_H=1 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -fPIC -I/usr/src/packages/BUILD/crystal-2.0.5/builddir/client -I/usr/src/packages/BUILD/crystal-2.0.5/client -I/usr/src/packages/BUILD/crystal-2.0.5 -I/usr/src/packages/BUILD/crystal-2.0.5/builddir -I/usr/src/packages/BUILD/crystal-2.0.5/builddir/lib -I/usr/src/packages/BUILD/crystal-2.0.5/lib -I/usr/src/packages/BUILD/crystal-2.0.5/effects -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtWebKit -I/usr/include/QtHelp -I/usr/include/QtAssistant -I/usr/include/QtDBus -I/usr/include/QtTest -I/usr/include/QtUiTools -I/usr/include/QtScript -I/usr/include/QtSvg -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtDesigner -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DVERSION=\"2.0.5\" -o CMakeFiles/kwin3_crystal.dir/crystalclient.o -c /usr/src/packages/BUILD/crystal-2.0.5/client/crystalclient.cpp
make[2]: *** [client/config/CMakeFiles/kwin_crystal_config.dir/crystalconfig.o] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/crystal-2.0.5/builddir'
make[1]: *** [client/config/CMakeFiles/kwin_crystal_config.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX shared module ../lib/kwin3_crystal.so
cd /usr/src/packages/BUILD/crystal-2.0.5/builddir/client && /usr/bin/cmake -E cmake_link_script CMakeFiles/kwin3_crystal.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc -Wl,-Bsymbolic-functions -shared -Wl,-soname,kwin3_crystal.so -o ../lib/kwin3_crystal.so CMakeFiles/kwin3_crystal.dir/kwin3_crystal_automoc.o CMakeFiles/kwin3_crystal.dir/buttonimage.o CMakeFiles/kwin3_crystal.dir/crystalbutton.o CMakeFiles/kwin3_crystal.dir/crystalclient.o /usr/lib64/libkdeui.so.5.3.0 -lkdecorations /usr/lib64/libkdecore.so.5.3.0 -lQtDBus -lQtCore -lpthread -lQtSvg -lQtGui
make[2]: Leaving directory `/usr/src/packages/BUILD/crystal-2.0.5/builddir'
/usr/bin/cmake -E cmake_progress_report /usr/src/packages/BUILD/crystal-2.0.5/builddir/CMakeFiles 2 3 4 5 6 7 8
[100%] Built target kwin3_crystal
make[1]: Leaving directory `/usr/src/packages/BUILD/crystal-2.0.5/builddir'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.72532 (%build)


System: openSUSE 11.1, Qt 4.5.2, KDE 4.3.0

Report

C

dralgebra

9 years ago

Sorry, I fail to see the actual error message. Could you paste some lines before that?

Report

rangerGR

9 years ago

I also have problem with kwin3_crystal.so


Quote:
-- Found Qt-Version 4.5.2 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Phonon Version: 4.3.1
-- Found KDE 4.3 include dir: /usr/include
-- Found KDE 4.3 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /media/Share/Share/adslgr/pkgs/KDE4/Kde4decor/crystal-kde4decor/src/crystal-2.0.5
Scanning dependencies of target embedtool
[ 0%] Built target kwin3_crystal_automoc
[ 7%] [ 7%] Built target kwin_crystal_config_automoc
Building CXX object pics/CMakeFiles/embedtool.dir/embedtool.o
[ 14%] [ 21%] [ 28%] Generating qrc_configdialog.cxx
Generating ui_configdialog.h
Generating ui_infodialog.h
Scanning dependencies of target kwin_crystal_config
[ 50%] [ 50%] [ 50%] Building CXX object client/config/CMakeFiles/kwin_crystal_config.dir/crystalconfig.o
Building CXX object client/config/CMakeFiles/kwin_crystal_config.dir/qrc_configdialog.o
Building CXX object client/config/CMakeFiles/kwin_crystal_config.dir/kwin_crystal_config_automoc.o
/home/george/adslgr/pkgs/KDE4/Kde4decor/crystal-kde4decor/src/crystal-2.0.5/client/config/crystalconfig.cpp:26:22: error: ../logos.h: No such file or directory
Linking CXX executable embedtool
[ 50%] Built target embedtool
[ 57%] [ 64%] [ 71%] Generating overlays.h
Generating tiles.h
Generating logos.h
Scanning dependencies of target kwin3_crystal
[ 78%] [ 85%] [ 92%] [100%] Building CXX object client/CMakeFiles/kwin3_crystal.dir/kwin3_crystal_automoc.o
Building CXX object client/CMakeFiles/kwin3_crystal.dir/crystalclient.o
Building CXX object client/CMakeFiles/kwin3_crystal.dir/crystalbutton.o
Building CXX object client/CMakeFiles/kwin3_crystal.dir/buttonimage.o
Linking CXX shared module ../lib/kwin3_crystal.so
[100%] Built target kwin3_crystal
make[2]: *** [client/config/CMakeFiles/kwin_crystal_config.dir/crystalconfig.o] Error 1
make[1]: *** [client/config/CMakeFiles/kwin_crystal_config.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
Aborting...

Report

C

dralgebra

9 years ago

Right, I see there is a stray include of "../logos.h" in crystalconfig.cpp, which was created later on. That line can savely be removed but a second compile run as-is should already fix the error for you.
Thanks, it will be fixed in the next release.

Report

Moony

9 years ago

Not sure if I'm doing something wrong here or what, but I'm getting this error during build:

/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp: In constructor ‘CrystalClient::CrystalClient(KDecorationBridge*, CrystalFactory*)’:
/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp:702: error: type ‘KDecoration’ is not a direct base of ‘CrystalClient’
/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp:702: error: no matching function for call to ‘KDecorationUnstable::KDecorationUnstable()’
/usr/include/kde4/kdecoration.h:881: note: candidates are: KDecorationUnstable::KDecorationUnstable(KDecorationBridge*, KDecorationFactory*)
/usr/include/kde4/kdecoration.h:877: note: KDecorationUnstable::KDecorationUnstable(const KDecorationUnstable&)

Any ideas how to get past this? Thanks!

Report

C

dralgebra

9 years ago

Mind trying Crystal-2.0.5, if it fixes your compile problems? Let me know how it works. Thanks. :)

Report

Moony

9 years ago

Sorry.. I goofed and posted my build problem twice. It was actually my error (because I am patching crystalclient.cpp with my own buttons). It compiles fine, but I did notice that if I set transparency to 75% in the crystal settings, average windows look fine, but the decorations on windows that have a transparent layer (like Konsole, gnome-terminal) are much more opaque, like 95%. Not sure if this is related to crystal or something else but thought I would mention it.

Report

C

dralgebra

9 years ago

Mind trying if Crystal-2.0.5 fixes your compile problem? Let me know if it works alright.

Report

mgraesslin

9 years ago

I've just scrolled through your source and I can't understand why you extend KDecorationUnstable. It is onyl needed if the decoration is providing it's own shadows. Translucency is also available with KDecoration.

When using unstable the deco will break with KDE 4.4 as there will probably be changes to KDecorationUnstable again. So if you want that your users can still use the decoration when KDE 4.4 is released, you shouldn't use Unstable ;-)

Report

C

dralgebra

9 years ago

You are right, I used it for the provided compositingActive but I find that available in KWindowSystem:: too. Might try to draw my own shadows though, because they don't seem quite right all the time but that might be a kwin bug.
Thanks, went back to KDecoration for the next release for now.

Report

Moony

9 years ago

Not sure if I'm doing something wrong here or what, but I'm getting this error during build:

/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp: In constructor ‘CrystalClient::CrystalClient(KDecorationBridge*, CrystalFactory*)’:
/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp:702: error: type ‘KDecoration’ is not a direct base of ‘CrystalClient’
/home/erik/Work/Fedora/11/BUILD/crystal-2.0.4/client/crystalclient.cpp:702: error: no matching function for call to ‘KDecorationUnstable::KDecorationUnstable()’
/usr/include/kde4/kdecoration.h:881: note: candidates are: KDecorationUnstable::KDecorationUnstable(KDecorationBridge*, KDecorationFactory*)
/usr/include/kde4/kdecoration.h:877: note: KDecorationUnstable::KDecorationUnstable(const KDecorationUnstable&)

Any ideas how to get past this? Thanks!

Report

Moony

9 years ago

Turns out this is due to an error on my part. Sorry for the bother.

Report

C

dralgebra

9 years ago

Please replace all KDecorationUnstable with KDecoration in crystalclient.h and crystalclient.cpp and in crystalclient.cpp@1263 write "KWindowSystem::compositingActive()". Does that fix your compile problem?

Report

chepioq

9 years ago

I use crystal since many years ago, with fedora, and I test today 2.0.4 version.
It's work, but choice "Buttons" don't work:
I usually use "Crystal Aqua" but when I chose it, the buttons are ugly, with a little square ribbed...

Report

C

dralgebra

9 years ago

Can you send me a screenshot? Do you have compositing enabled? Did you restart kwin, in case you upgraded from a previous install? Does it happen with other buttons too; do the buttons change at all?

Report

chepioq

9 years ago

Hi
Thank for your reply
When change for the other butoons, there is same results,
I am composite enable, desktop effect enable, and when I install the 2.0.4, it is an update, i don't remove the crystal of Fedora (it is the 1.0.5)
For the screen-shot, give me your email by MP, and I will send you...

Report

chepioq

9 years ago

Not ideas for this problem with decorator?

Report

C

dralgebra

9 years ago

Unfortunately no. I don't have the chance to test it on many systems though. What distribution are you using, what version of Qt? I guess switching off compositing doesn't help?

Report

chepioq

9 years ago

I test the 2.0.5 for same results.
I use Fedora 11, with Kde 4.3, the version of PyQt is PyQt4, switching off compositing doesn't help.

Report

Zarin

9 years ago

You have a bug in your supports() function that causes issues with new abilities in KDE 4.3, please see:

https://bugs.kde.org/show_bug.cgi?id=200952

Report

WiseLord

9 years ago

It seems rounding windows corners doesn't work in KDE4.3 betas and RCs

Report

Chrischaan

9 years ago

The same happened to my desktop. It's not a real bug but a result of changing something inside of KDE. If you want to fix it yourself you have to change line 790 and 829 of "crystalclient.cpp".

Line 790:
"setMask(QRegion(widget()->rect()));" --> "widget()->setMask(QRegion(widget()->rect()));"

Line 829:
"setMask(mask);" --> "widget()->setMask(mask);"

After compiling and installing the rounded corners are back again. ;-)

Report

WiseLord

9 years ago

Thanks, it works

Report

11 years ago

2.2.1 (KDE 4.9):
* Fix tabbing after window shading


2.2.0 (KDE 4.9 only):
* Use API for KDE 4.9

2.1.1 (KDE 4.8):
* Improved compatibility with KDE 4.8
* Fixed possible glitches without compositing in KDE 4.8
* Draws own shadows


2.1.0:
* Support of KDE's cool window tabbing / grouping feature!!
* Fix working with kdocker >= 4.5, if installed (right click on close button to run)
* Fix glitch of round corners in compositing mode introduced in 2.0.6. Reduced options of round corners to 1 for code simplification.


2.0.6:
* Use Blur effect for transparent borders when kwin-plugin is enabled (needs KDE >= 4.6.0)
* Updated aqua button theme
* New button theme: glass-pill
* Fix some compile warnings


2.0.5:
* Use KDecoration again instead of KDecorationUnstable; hopefully fixes compile problems
* Remove some probably unnecessary redrawing


2.0.4:
* Built-in logos for various distros
* Some experimental transparency support (requires KDE4 compositing)
* Fix not showing shadow in compositing mode (whiteliste abilities now, not blacklist them; thanks to Zarin for pointing that out)

2.0.3:
* Possibility to stretch or scale overlay images
* Fix showing logo on active window only
* Disable caption shadow for inactive windows so it's easier to read
* Work around "hollow" border glitches when using half-maximized states
* Added backported Kubuntu-Hardy button theme (thanks to Kubuntu team)
* Little nicer default settings

2.0.2:
* Adding back button images in configuration dialog
* Set tooltip of decoration to caption right from the beginning
* Creating and using embedtool again to create tiles.h

2.0.1:
* Scrolling through open windows works again (if option is enabled)
* Link to this page in the info dialog
* Minimizing to systray using kdocker works again

2.0.0:
* Initial release of KDE 4.x port

12345678910
317
product-maker danhuu Sep 08 2015 8 great
product-maker RavenLX Feb 20 2013 8 great
product-maker herrbatka Feb 05 2013 8 great
product-maker sakasa Jan 10 2013 8 great
product-maker reves121 Jul 08 2012 8 great
product-maker unikum111 Jul 07 2012 8 great
product-maker mcder Jul 02 2012 8 great
product-maker juank202 Jul 01 2012 8 great
product-maker saftsocken Jul 01 2012 8 great
product-maker 8Ypsilon Jul 01 2012 8 great
product-maker idonthack Sep 06 2011 8 great
product-maker amigib Jun 28 2011 8 great
product-maker TommyCZ Jun 19 2011 3 bad
product-maker RGBkde Jun 17 2011 8 great
product-maker Alesvol Jun 05 2011 8 great
product-maker caig Jun 05 2011 8 great
product-maker vitoubien Jun 02 2011 3 bad
product-maker fadnix Mar 27 2011 8 great
product-maker molecule-eye Nov 01 2010 3 bad
product-maker lf88 Oct 25 2010 8 great
product-maker Count:233 Rating: 6.75
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
2.2.1
updated Jan 09 2013
added Feb 11 2008
downloads today
0
page views today 5
+