Karuna OS Logo
JCL
Source i (link to git-repo or to original if based on someone elses unmodified work):
© 2025 store.kde.org - The official KDE Store
All rights reserved. All trademarks are copyright by their respective owners. All contributors are responsible for their uploads.
Ratings & Comments
10 Comments
http://www.linuxquestions.org/questions/general-10/a-binary-alpha-release-of-my-kernel-now-with-full-source-762850/page40.html#post4021086 http://www.linuxquestions.org/questions/programming-9/gcc-compilation-error-817542/ Moderator/Admin/Whomever ... please remove this silliness that folks don't unknowingly waste their time.
I'm not sure that this code does anything!
Someone can say if this module works really? And a "how to" could be helpful too. Thanks.
For those of you who need help finding out what integers or decimals go into the color or Alpha places, listen up: The color values (Red, Green, or Blue) can have values from 0 to 255. The alpha value is a decimal between 0 and 1, 1 being opaque and 0 being completely transparent. An example of the color of Ubuntu 10.04's progress bars with 60% transparency, for example: rgba(241, 93, 44, 0.6); For solid red with 60% transparency: rgba(255, 0, 0, 0.6); For solid blue with 60% transparency: rgba(0, 0, 255, 0.6); For solid green with 60% transparency: rgba(0, 255, 0, 0.6); For cyan with 60% transparency: rgba(0, 255, 255, 0.6); For magenta with 60% transparency: rgba(255, 0, 255, 0.6); For yellow with 60% transparency: rgba(255, 255, 0, 0.6); For black with 60% transparency: rgba(0, 0, 0, 0.6); For white with 60% transparency: rgba(255, 255, 255, 0.6); And the list goes on. And yes, Alpha can accept more than one decimal place for more precise color customization. This can be used in themes more than anything else to RGBA individual parts of it as mentioned previously.
The idea sounds so great, but I still having many questions, I'm new on this... can I use this on a gtk-theme?? if yes, could you put an example??? do I need murrine engine to make this work? which path should I put this code?? ---------------------------------------- #include <glib.h> #include <glib/gtypes.h> #include <gtk/gtk.h> void rgbamap(unsigned long Red, unsigned long Green, unsigned long Blue, float Alpha) { unsigned long rgbCube = Red * Green * Blue; double aRed = Alpha*(Red); double aGreen = Alpha*(Green); double aBlue = Alpha*(Blue); double rBlend = (1 - Alpha)*Red + Alpha*(aRed); double gBlend = (1 - Alpha)*Green + Alpha*(aGreen); double bBlend = (1 - Alpha)*Blue + Alpha*(aBlue); }; ---------------------------------------- thanks in advance for your time =D
The code has been edited and reposted, but you would compile it using the following command: gcc -fPIC -shared librgbamap.c -o librgbamap.so `pkg-config --cflags --libs gtk+-2.0` and then copy it to /usr/lib/gtk-2.0/modules. Or, if you don't want to touch the terminal, download the precompiled binary (also here) and again copy it to /usr/lib/gtk-2.0/modules.
For example, If I want a part of the gtk theme black with a 60%, this is correct? engine "murrine" { rgba = (0, 0, 0, 0.6) }
Just so you're wondering, the current RGBA module just has two options: true and false. This is a whole RGBA color map. It allows you to change the color of and make transparent individual elements of a theme, such as the window borders, while leaving everything else opaque. It also allows you to change colors of specific items using more than just HTML notations. Makes sense now? It can be used to RGBA parts of a theme, not just the whole theme or nothing. Also: You can tell the module how transparent or opaque you want the transparency to be.
Hi, looks interesting, but I don't understand yet how to use it and where. Does it replace the need for modifying the murrine source, and do I put your lines in .profile, or is it able to configure different transparancy levels for different widgets in gtkrc?
The difference between librgba and librgba-tunable goes as follows: Librgba only has two options: true and false. Librgba-tunable has many options: [code]int rgba(int, int, int, int);[/code] Essentially, this module is a function that defines a whole RGBA color map, allowing you to set how transparent or opaque your color map is, plus set what colors you can have in it, just like GNOME Shell's RGBA function, only in GTK, not the Shell.