Tunable GTK RGBA module

Various Gnome Stuff

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Available as/for:
Description:
This differs from the GTK RGBA module currently on here as it is a function, not a boolean.

Ratings & Comments

10 Comments

charleswight

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.

charleswight

I'm not sure that this code does anything!

ubuntico

Someone can say if this module works really? And a "how to" could be helpful too. Thanks.

KennyStrawn

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.

juandejesuss

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

KennyStrawn

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.

ubuntico

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) }

KennyStrawn

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.

VCoolio

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?

KennyStrawn

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.

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Various Gnome Stuff:

Karuna OS Logo
JCL
last update date: 18 years ago

Score 5.0

Ubuntu for Sony Ericsson z520i
microscopuce
last update date: 18 years ago

Score 5.0

Ubuntu Studio for SE z520i
microscopuce
last update date: 18 years ago

Score 5.0

Ubuntu Humunity
noobilus
last update date: 14 years ago

Score 6.1

VDesk - Visual Desktop
AnthonyAMC
last update date: 13 years ago

Score 5.5

Youtube search function for gnome shell
rivetrik
last update date: 13 years ago

Score 5.0