Commit graph

49 commits

Author SHA1 Message Date
Hanno Meyer-Thurow
dc69fe7ced Theme button-specific values should fallback to the button general values consistently (Fix bug 5443) 2012-09-30 18:46:10 -04:00
Dana Jansens
9415459aea Make the inactive osd text color fall back to the old osd property, and lastly inherit from the unfocused window color. 2012-09-30 14:58:11 -04:00
Dana Jansens
fd9bb43059 Strip leading/trailing whitespace when parsing colors and other strings (bug #4937) 2011-10-16 18:51:51 -04:00
Dana Jansens
808bb02af8 free undecorated border colors 2011-10-16 18:51:51 -04:00
Carlos Pita
fadf435ee1 Specific border width/color for undecorated active/inactive windows (bug #4889)
The attached patch adds three theme options with backward compatible defaults:

undecorated.border.width
  defaults to border.width

window.undecorated.active.border.color
  defaults to window.active.border.color

window.undecorated.inactive.border.color
  defaults to window.inactive.border.color
2011-10-16 18:51:51 -04:00
Mikael Magnusson
98b02c6b60 Fix a memleak introduced by 0dd91ba0e2, some cleanups 2011-08-03 23:01:28 +02:00
Dana Jansens
ef0bfdc743 be a bit more explicit about what is being copied from one texture to another 2011-08-02 22:18:34 +02:00
Carlos Pita
177a0340a7 Separate theme options for osd prompt buttons.
I managed to keep backwards compatibility without really cluttering
the code so here is the patch
http://bugzilla.icculus.org/show_bug.cgi?id=4874 too.

Please keep in mind that this is my first piece of code for openbox
and that I'm not a die hard openbox user (yet), not to tell the patch
was not exhaustively tested. Anyway I think it's pretty much in a good
shape but any criticism will be welcome.

Basically the patch add the following theme options for controlling
buttons in osd prompts:

%%%% colors
%
% for the text inside the button
osd.button.unpressed.text.color
osd.button.pressed.text.color
osd.button.focused.text.color
%
% for the line art around the button
%  (if you don't wan't the box just make box.color = bg.color)
osd.button.pressed.box.color
osd.button.focused.box.color

%%%% textures
%
osd.button.unpressed.bg
osd.button.pressed.bg
osd.button.focused.bg

The buttons can be in three states:

 unpressed: neither clicked nor selected
 focused: selected but not clicked
 pressed: clicked (and of course selected)

I discarded the previous distinction between press and pfocus as in
fact it was only a formal distinction, in that both appearances
mimicked each other in every sense. It think that it was just
inherited from the way titlebar buttons are managed so I decided to
simplify it a bit.

All the options default in a way that preserves backwards compatibility:

osd.button.unpressed.text.color  -> osd.active.label.text.color
osd.button.pressed.text.color -> osd.active.label.text.color
osd.button.focused.text.color -> osd.active.label.text.color

osd.button.pressed.box.color ->  window.active.button.pressed.image.color
osd.button.focused.box.color -> window.active.button.hover.image.color

osd.button.unpressed.bg -> window.active.button.unpressed.bg
osd.button.pressed.bg -> window.active.button.pressed.bg
osd.button.focused.bg -> window.active.button.hover.bg

Notice that a good deal of locs where added to theme.c but in
compensation prompt.c is pretty much simpler now because the
appearances and textures are created while loading the theme.
2011-08-02 22:18:31 +02:00
Mikael Magnusson
d09fd3183e Merge branch 'm4/master' 2011-08-02 22:18:14 +02:00
Mikael Magnusson
9116b124da Revert these two commits temporarily to make the buttons merge easier
1e427a3358
2288da0ae3
2011-08-02 22:17:17 +02:00
Mikael Magnusson
d162451a01 Fix some rebase artifacts 2011-08-02 20:58:51 +02:00
Dana Jansens
2288da0ae3 be a bit more explicit about what is being copied from one texture to another 2011-08-01 11:49:43 -04:00
Carlos Pita
1e427a3358 Separate theme options for osd prompt buttons.
I managed to keep backwards compatibility without really cluttering
the code so here is the patch
http://bugzilla.icculus.org/show_bug.cgi?id=4874 too.

Please keep in mind that this is my first piece of code for openbox
and that I'm not a die hard openbox user (yet), not to tell the patch
was not exhaustively tested. Anyway I think it's pretty much in a good
shape but any criticism will be welcome.

Basically the patch add the following theme options for controlling
buttons in osd prompts:

%%%% colors
%
% for the text inside the button
osd.button.unpressed.text.color
osd.button.pressed.text.color
osd.button.focused.text.color
%
% for the line art around the button
%  (if you don't wan't the box just make box.color = bg.color)
osd.button.pressed.box.color
osd.button.focused.box.color

%%%% textures
%
osd.button.unpressed.bg
osd.button.pressed.bg
osd.button.focused.bg

The buttons can be in three states:

 unpressed: neither clicked nor selected
 focused: selected but not clicked
 pressed: clicked (and of course selected)

I discarded the previous distinction between press and pfocus as in
fact it was only a formal distinction, in that both appearances
mimicked each other in every sense. It think that it was just
inherited from the way titlebar buttons are managed so I decided to
simplify it a bit.

All the options default in a way that preserves backwards compatibility:

osd.button.unpressed.text.color  -> osd.active.label.text.color
osd.button.pressed.text.color -> osd.active.label.text.color
osd.button.focused.text.color -> osd.active.label.text.color

osd.button.pressed.box.color ->  window.active.button.pressed.image.color
osd.button.focused.box.color -> window.active.button.hover.image.color

osd.button.unpressed.bg -> window.active.button.unpressed.bg
osd.button.pressed.bg -> window.active.button.pressed.bg
osd.button.focused.bg -> window.active.button.hover.bg

Notice that a good deal of locs where added to theme.c but in
compensation prompt.c is pretty much simpler now because the
appearances and textures are created while loading the theme.
2011-08-01 11:49:39 -04:00
Dana Jansens
001f174cf5 Big rework of image.c and the image cache system.
Added a lot of comments, simplified call graphs.
Added full (not second-class) support for images coming from named sources (files, icon themes).
RrImage holds an RrImageSet.  RrImageSet holds a bunch of RrImagePic, which are different sizes of a logical image.
RrImageSet objects can be merged if it is discovered they (will) share an RrImagePic.  The RrImage objects are updated to use the new merged RrImageSet.
2011-01-24 14:19:22 -05:00
Mikael Magnusson
da5441ecec Fix g_slice_new0 call 2010-10-14 15:58:41 +02:00
Dana Jansens
a621e7a4fc fix 80 cols and clean up the button color loading function 2010-10-14 15:54:48 +02:00
Dave Foster
95ed843702 cleaning up remnants of bad rebase merges and modernizing some sections 2010-10-14 15:54:48 +02:00
Dave Foster
464ee8996e Menu bullet color support. 2010-10-14 15:54:48 +02:00
Dave Foster
3c8840a6cc Make the btn textures use their own image color. 2010-10-14 15:54:47 +02:00
Dave Foster
8058df3f7c Buttons seem to work! 2010-10-14 15:54:47 +02:00
Dave Foster
5d7c022bb4 (non-working) Getting theme started. Button textures read to the right place. 2010-10-14 15:54:47 +02:00
Dave Foster
f250c9dc2b Button structure. 2010-10-14 15:54:47 +02:00
Dave Foster
0ae3388b6a Button proper freeing/newing. 2010-10-14 15:54:47 +02:00
Dave Foster
6d30d66efb Adding RrButton to libobrender, ref counted appearances. 2010-10-14 15:54:44 +02:00
Dave Foster
b566d3fcfe Another way of getting at button-*.toggled.unpressed (no unpressed needed). 2010-10-14 15:49:20 +02:00
Dave Foster
9bc70d9373 Rearranged all button appearance reading for logical purposes, better defaults. 2010-10-14 15:49:20 +02:00
Dave Foster
ef8108695f Found a bug in one of the specialized button textures. 2010-10-14 15:49:20 +02:00
Dave Foster
ccd4d460e5 Need to allocate appearances! 2010-10-14 15:49:20 +02:00
Dave Foster
cc0b1f7569 Made specific buttons be button-<name> instead of button.<name> 2010-10-14 15:49:20 +02:00
Dave Foster
b80a7fa015 Individual button appearances from the theme. 2010-10-14 15:49:20 +02:00
Dave Foster
2593c32930 Read into _tmp RrAppearance, not theme->a_*_max 2010-10-14 15:49:19 +02:00
Dave Foster
b7350d3ebd Temporary storage locations for texture reads. 2010-10-14 15:49:19 +02:00
Dave Foster
01506d6a74 READ_COLOR macros done, RrColorCopy added, indentation fixed. 2010-10-14 15:48:20 +02:00
Dave Foster
2338bf0aa3 default for menu overlap 2010-10-14 15:46:39 +02:00
Dave Foster
0dd91ba0e2 Removed trailing spaces and fixed to 80 column width. 2010-10-14 15:46:39 +02:00
Dave Foster
c9d74e3da1 READ_APPEARANCE* macros and code cleanups. 2010-10-14 15:43:57 +02:00
Dave Foster
918efe8e49 READ_COLOR macros done, RrColorCopy added, indentation fixed. 2010-10-14 15:43:57 +02:00
Dave Foster
5f963a1fbc READ_INT macro. 2010-10-14 15:28:01 +02:00
Dana Jansens
1c637efcbb new enum values need to be handled in switches
(the new enum values were added to count the number of entries in the enums)
2010-05-17 19:31:21 -04:00
Dana Jansens
925e4c5979 fix typo in enum 2010-05-17 19:31:21 -04:00
Derek Foreman
48ad5f6ccd add _NUM_TYPES to obrender enums, to allow enumeration of the enum values 2010-05-13 15:10:02 -04:00
Dana Jansens
d179d6428a more using g_slice_new() instead of g_new() 2010-02-16 16:32:38 -05:00
Dana Jansens
1265a23e53 include imlib2 as a dep of obrender in the pkg-config file if it's using it 2010-02-12 15:13:39 -05:00
Dana Jansens
e61fd8874a use g_slice_new() instead of g_new() part 4 2010-02-12 14:13:32 -05:00
Dana Jansens
3bd4397b6e Merge branch 'backport' into work
Conflicts:

	openbox/frame.c
2010-01-14 16:19:57 -05:00
Mikael Magnusson
3e9dbc0143 Fix ordering so fallback for inactive osd to label works
The themeing options (sic) for inactive osd labels added in
cfdbe23e0d had the fallback to inactive
label before that was read in, so fallback failed to pick up some
things.
2010-01-11 01:27:30 +01:00
Dana Jansens
8c9fb63baa Rework the code provided by Kadlcik Libor for loading/showing icons in Openbox menus.
This changes how the imagecache works, you can load an image into it directly,
or you can load it by name (then it will load it from a file on disk).

NOTE: The name part is incomplete, as it needs to use the freedesktop.org icon
spec to search for the right file.  Also to resize it should look for another
icon on disk with the same name but different size (icon themes).
2010-01-08 17:55:19 -05:00
Kadlcik Libor
0352abfa88 This patch implements support for icons in user-defined menus into Openbox
Image loading is done using the Imlib2 library.
I chose Imlib2 because it's pretty fast, it's easy to use, supports many file
formats (tested xpm, gif, jpeg, png) and doesn't introduce too much bloat (it
depends :)).

I ported the patch to 3.4.7-pre3 and added some enhancements. Caching is much
better now, and icons can be disabled at compile time using --disable-imlib2
option.

What's new?
Syntax of configuration files (namely rc.xml and menu.xml) has been changed
slightly to allow users to associate icons to menu entries. This is done by
specifying path to icon file in the new "icon" attribute in "<item>" element,
e.g:
<item label="Vim" icon="/usr/share/pixmaps/vim-32.xpm">
  <action name="Execute"><execute>x-terminal-emulator -T Vim -e
vim</execute></action>
</item>

If user doesn't want to display any icons in his user-defined menus, he/she can
disable icons in rc.xml, inside "<menu>" section:
<menu>
 ...
  <showIcons>no</showIcons>
 ...
</menu>
Default value is "yes".
(New boolean variable "config_menu_user_show_icons" has been added to source
code.)

An icon is loaded (using menu_item_attach_icon()) when a new entry of menu is
created. Fortunately, I haven't notice any performance problems because of this
:).
2010-01-08 17:55:19 -05:00
Dana Jansens
7aae8cc526 Set up work for making a 3.5 prerelease.
Set version stuff to 3.5.0-rc1.
Copy the CHANGELOG from 3.4-working.
Rename the obt-4.0 and obrender-4.0 pkgconfig stuff to obt-3.5 and obrender-3.5
Rename the "render" directory to "obrender" so that the public headers can be
  installed in <obrender/*>
2009-12-21 14:08:34 -05:00