Commit graph

106 commits

Author SHA1 Message Date
Richard Frith-MacDonald
1501023c3b Theme alteration for Riccardo, plus some formatting tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39110 72102866-910b-0410-8b05-ffd578937521
2015-11-01 15:38:47 +00:00
Fred Kiefer
cc73eeacdc * Source/NSBundleAdditions.m,
* Source/NSNibConnector.m: Move NSNibConnector and subclasses in
        separate file. Add isEqual: method from Gorm. Switch to new
        libobjc runtime ivar access for NSNibOutletConnector.
        * Source/GNUmakefile: Add new file NSNibConnector.m
        * Source/GSXibLoader.m: Similar change to IBOutletConnection.
        Replace GSMime base64 decode method with standard one.
        * Source/GSImageMagickImageRep.m,
        * Source/GSTheme.m: Remove unused #import.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38919 72102866-910b-0410-8b05-ffd578937521
2015-08-23 17:10:39 +00:00
Eric Wasylishen
64432f901d * Source/GSThemePrivate.h:
* Source/GSTheme.m: Add GSStringFromImageFrameStyle
	* Source/GSThemeDrawing.m (-drawBorderForImageFrameStyle:...):
	Use GSStringFromImageFrameStyle to get tiles, if presentwq


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37242 72102866-910b-0410-8b05-ffd578937521
2013-10-16 05:14:32 +00:00
Eric Wasylishen
c05595c8be * Source/GSThemeDrawing.m (-drawColorWellBorder:...): Draw inner
border using part GSColorWellInnerBorder
	* Source/GSTheme.m:
	* Headers/Additions/GNUstepGUI/GSTheme.h: Add GSColorWellInnerBorder
	part name


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37240 72102866-910b-0410-8b05-ffd578937521
2013-10-16 04:11:41 +00:00
Eric Wasylishen
310b7d5786 * Headers/Additions/GNUstepGUI/GSTheme.h: Remove GSScrollViewBottomCorner
part name, instead themes should just provide a part called NSScrollView.

	Add -scrollViewScrollersOverlapBorders method.

	* Source/GSTheme.m: Remove GSScrollViewBottomCorner part name.
	* Source/GSThemeDrawing.m: Add -scrollViewScrollersOverlapBorders.
	* Source/GSThemeDrawing.m (-drawBrowserRect:...): If
	-scrollViewScrollersOverlapBorders is enabled, fill the browser background
	with the NSScrollView tile.
	* Source/GSThemeDrawing.m (-drawScrollViewRect:...): If
	-scrollViewScrollersOverlapBorders is enabled, fill the scroll view background
	with the NSScrollView tile.
	* Source/NSScroller.m (-rectForPart:): Change the meaning of the
	GSScrollerKnobOvershoot default so the knob only overlaps the buttons
	by this much (rather than both ends of the track). Turns out this is more
	useful for themes.
	* Source/NSScrollView.m (-tile): Add support for
	-[GSTheme scrollViewScrollersOverlapBorders]
	* Source/NSBrowser.m (-tile): Add support for
	-[GSTheme scrollViewScrollersOverlapBorders] and
	-[GSTheme scrollViewUseBottomCorner]

	The overall point of these additions is to support NSScrollView and
	NSBrowser looking like: http://jesseross.com/clients/gnustep/ui/concepts/


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37238 72102866-910b-0410-8b05-ffd578937521
2013-10-15 23:26:51 +00:00
Eric Wasylishen
6f4a16835b * Headers/Additions/GNUstepGUI/GSTheme.h: Add three new theme
control state: GSThemeFirstResponderState,
GSThemeHighlightedFirstResponderState,
and GSThemeSelectedFirstResponderState. This lets themes draw
custom first responder tiles, if the desired effect can't be
accomplished by drawing on top of an existing button.
* Source/GSThemeDrawing.m (-drawFocusFrame:inRect:):
Use tiles named "NSFocusRing" if available, else draw dotted
rect.
* Source/GSTheme.m:
* Source/NSButtonCell.m: Use new GSTheme*FirstResponderState
states


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37227 72102866-910b-0410-8b05-ffd578937521
2013-10-14 17:18:38 +00:00
Eric Wasylishen
5501a5a4b7 * Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSTheme.m: Add GSProgressIndicatorBezel part name
* Source/GSThemeDrawing.m (-drawProgressIndicatorBezel:withClip:):
Use GSProgressIndicatorBezel to draw bezel if available.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37222 72102866-910b-0410-8b05-ffd578937521
2013-10-14 03:31:54 +00:00
Eric Wasylishen
3e533f43b1 * Source/GSThemeDrawing.m:
* Source/GSTheme.m:
* Headers/Additions/GNUstepGUI/GSTheme.h: Add part names for
themeing bottom tabs.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37211 72102866-910b-0410-8b05-ffd578937521
2013-10-09 01:48:50 +00:00
Eric Wasylishen
8624e56f43 * Source/GSTheme.m (-tilesNamed:state:): Interpret .9.png files
as NinePatch=YES. If a tile isn't listed in GSThemeTiles in the
plist, try to find it in the ThemeTiles directory anyway. This
lets you avoid declaring tiles in the info plist.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37208 72102866-910b-0410-8b05-ffd578937521
2013-10-08 19:32:09 +00:00
Eric Wasylishen
7d7cac6780 * Source/GSThemeDrawing.m: Rewrite tab drawing code to be more
organized, lay out the images in a straightforward way, and
allow themeing the fill part of the tab between the end images.
The output is almost pixel-identical to
the old code (only some unnoticable 1-pixel differences
in where shadows end). It's also organized so that adding support
for left and right tabs should be easy.
* Headers/Additions/GNUstepGUI/GSTheme.h: Add some part names
* Images/common_Tab*.tiff: Tweak to work with the new layout code.
All top images are now the same size, as are all bottom images.
* Images/GNUmakefile:
* Images/common_TabUnSelectToSelectedJunction.tiff: Renamed to
Images/common_TabUnSelectedToSelectedJunction.tiff
* Source/GSThemePrivate.h:
* Source/GSTheme.m: Add GSStringFromTabViewType utility function


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37205 72102866-910b-0410-8b05-ffd578937521
2013-10-08 08:01:23 +00:00
Eric Wasylishen
c63df23ba8 * Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSTheme.m:
* Source/GSThemeDrawing.m:
* Source/NSBox.m: Factor out -[NSBox drawRect:] to GSTheme
method -drawBoxInClipRect:boxType:borderType:inView:.
Add a tiles name GSBoxBorder for themeing the box border.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37188 72102866-910b-0410-8b05-ffd578937521
2013-10-03 19:52:05 +00:00
Eric Wasylishen
2347347cf9 * Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSTheme.m:
Declare GSSliderHorizontalTrack and GSSliderVerticalTrack
part names for themeing the background of NSSlider
* Source/GSThemeDrawing.m:
Add new drawSliderBorderAndBackground:frame:inCell:isHorizontal:
method to draw the slider border and background.
* Source/GSThemePrivate.h:
* Source/GSThemeTools.m:
Add a -size method on GSDrawTiles which returns the total
original size of the tiles, so we can easily compute a rect
that scales the tiles in only one dimension.
* Source/NSSliderCell.m:
Override _drawBorderAndBackgroundWithFrame: to call new
GSTheme method. Also, tweak the knob drawing code; the knob
is now centered and drawn at its native size. This still looks
correct with the default slider sizes create by Gorm.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37185 72102866-910b-0410-8b05-ffd578937521
2013-10-03 04:51:10 +00:00
Eric Wasylishen
dfab5c6196 * Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSTheme.m:
* Source/GSThemeDrawing.m:
* Source/NSPopUpButtonCell.m: Add a theme part GSPopUpButton
so NSPopUpButtonCell can be drawn with a different background
than NSMenuItemCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37183 72102866-910b-0410-8b05-ffd578937521
2013-10-02 23:56:16 +00:00
Eric Wasylishen
3bbfcbaab2 * Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/NSScrollView.m:
* Source/GSThemeDrawing.m:
* Source/GSTheme.m: Add GSScrollViewUseBottomCorner default,
which themes can set to NO to leave a square gap in the bottom-
left (or bottom-right) corner where the horizontal and vertical
scrollers meet.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37176 72102866-910b-0410-8b05-ffd578937521
2013-09-30 05:53:21 +00:00
Eric Wasylishen
2fe4c2e708 * Source/GSTheme.m:
* Source/GSTitleView.m:
* Source/GSThemeDrawing.m:
* Headers/Additions/GNUstepGUI/GSTheme.h: Add GSMenuTitleBackground
theme tile for themeing the background of GSTitleView.

NOTE: I removed some code that was in -[GSTitleView drawRect:] for
drawing with a different style when the GSTitleView is NOT owned
by an NSMenu, but by an NSWindow/NSPanel (_ownedByMenu == NO).
If needed, this can be added back, but it doesn't appear to ever
be used in gnustep-gui - GSTitleView is only created in one place,
with NSMenu as the owner.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37165 72102866-910b-0410-8b05-ffd578937521
2013-09-29 00:30:59 +00:00
Riccardo Mottola
28fff5bc13 Add license to the Theme properties
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36889 72102866-910b-0410-8b05-ffd578937521
2013-07-15 13:20:41 +00:00
Quentin Mathe
da2351d2b2 Added support for providing custom theme control images (e.g. checkbox) in the same way we support it for tiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36836 72102866-910b-0410-8b05-ffd578937521
2013-07-04 15:46:11 +00:00
Eric Wasylishen
67daa51afa * Source/GSTheme.m:
* Source/NSImage.m: Revert previous commit and write a much cleaner
implementation that fixes the same bug.

I removed the step in theme activation where we call
+[NSImage _setImagePath:name:] on each image in the theme, and instead
modified +[NSImage _pathForImageNamed:] to also search the theme images
directory.

When a GSTheme activates now, it only calls +[NSImage _reloadCachedImages]
which checks all NSImage cached by name and reloads any whose path has
changed.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36482 72102866-910b-0410-8b05-ffd578937521
2013-04-06 19:30:48 +00:00
Eric Wasylishen
23d47ca882 Revert "Allow themes to override only a "base" image like"
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36481 72102866-910b-0410-8b05-ffd578937521
2013-04-06 19:30:30 +00:00
Eric Wasylishen
5dcf9e3251 Allow themes to override only a "base" image like
common_3DArrowRight and have images that map to it (NSMenuArrow)
automatically update.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36474 72102866-910b-0410-8b05-ffd578937521
2013-04-06 07:57:57 +00:00
David Chisnall
4850a9feac Fix all current compiler warnings on FreeBSD/x86-64.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36038 72102866-910b-0410-8b05-ffd578937521
2013-01-30 09:48:54 +00:00
Fred Kiefer
d570812401 Fix clang compiler warnings as reported by Sebastian Reitenbach
<sebastia@l00-bugdead-prods.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34608 72102866-910b-0410-8b05-ffd578937521
2012-01-23 14:27:58 +00:00
Richard Frith-MacDonald
db92916b2f Attempt to get gnome and windows themes working again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34528 72102866-910b-0410-8b05-ffd578937521
2012-01-14 17:55:43 +00:00
Richard Frith-MacDonald
28460f68e4 Cleanup/simplify code for handling theme names in defaults system
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34527 72102866-910b-0410-8b05-ffd578937521
2012-01-14 16:10:48 +00:00
Eric Wasylishen
bff0f57b54 * Source/GSTheme.m: Remove code which sets and unsets images
on theme activation/deactivation.
* Source/NSImage.m (+imageNamed:): Factor out code for finding
the path for a name to a separate method, +pathForImageNamed.
The code is unchanged otherwise, except for fixing the retrieval
of images from the theme bundle, which was broken.
* Source/NSImage.m (-setName:): Remove code for creating theme
proxy. Subscribe/unscribe to theme change notification when
the receiver is added/removed from the name dictionary.
* Source/NSImage.m (-themeDidActivate:): Method called in
response to a GSThemeDidActivateNotification on images with
a name set. It does a path lookup in the same way that
+imageNamed: would, and checks if the path has changed due
to the theme change. If it has, all reps are discarded and
the image at the new path is loaded. This avoids the need for
the theme proxy objects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34474 72102866-910b-0410-8b05-ffd578937521
2012-01-10 04:38:10 +00:00
Fred Kiefer
8ad4aa86c4 Replace some occurences of int with NSInteger
and unsigned with NSUInteger. This allows to recompile gui on 
64 bit systems after the change to NSNotFound in base.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
2011-12-17 17:16:09 +00:00
Quentin Mathe
98e188a767 Removed logging statement that shouldn't have been committed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34175 72102866-910b-0410-8b05-ffd578937521
2011-11-16 10:37:47 +00:00
Quentin Mathe
96aad93e0f Improved the menu theming to support some common menu look variations.
Fixed bug #34792 too.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34174 72102866-910b-0410-8b05-ffd578937521
2011-11-16 10:32:15 +00:00
Quentin Mathe
e2967ab5bc Made separator menu item themable, by moving the drawing code from
NSMenuItemCell to a new method in GSThemeDrawing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34079 72102866-910b-0410-8b05-ffd578937521
2011-10-28 09:40:41 +00:00
Gregory John Casamento
50c93b82e2 2011-06-09 13:49-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move notifications handling code to
	setTheme: instead and add code which deactivates the notifications
	and then starts listening again after activate is called.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33267 72102866-910b-0410-8b05-ffd578937521
2011-06-09 17:51:39 +00:00
Gregory John Casamento
a56d2d4fc9 2011-06-09 13:43-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move call to listen to default changes to 
	activate instead of +initialize. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33266 72102866-910b-0410-8b05-ffd578937521
2011-06-09 17:46:36 +00:00
David Chisnall
87d2bfba5f More unsigned < 0 tests.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32351 72102866-910b-0410-8b05-ffd578937521
2011-02-24 13:28:20 +00:00
Eric Wasylishen
26fcda321b Replace sel_eq with sel_isEqual
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31285 72102866-910b-0410-8b05-ffd578937521
2010-09-09 23:50:38 +00:00
Gregory John Casamento
cefa1b53e7 * Source/GSTheme.m: remove forward declaration for _setArchiveByName
from NSImage category.
	* Source/NSImage.m: Added code in _setImage:forName: to archive
	by name instead.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31075 72102866-910b-0410-8b05-ffd578937521
2010-08-03 21:11:00 +00:00
Gregory John Casamento
6d682ee88e 2010-07-22 19:35-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Call method _setArchiveByName: with YES so that
	images loaded by a theme will not be persisted as image data, but
	rather as references.  This will avoid an issue with saving theme
	images when saving files in Gorm while a theme is loaded.
	* Source/NSImage.m: Added method _setArchiveByName:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31021 72102866-910b-0410-8b05-ffd578937521
2010-07-22 23:27:36 +00:00
Richard Frith-MacDonald
046be50f74 Attempt fix for Riccardos's latest issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30328 72102866-910b-0410-8b05-ffd578937521
2010-05-09 06:55:33 +00:00
Eric Wasylishen
0d365b7d10 NSBrowser header themeing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30189 72102866-910b-0410-8b05-ffd578937521
2010-04-19 03:14:36 +00:00
Fred Kiefer
00ab729bdd Next bit of #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30029 72102866-910b-0410-8b05-ffd578937521
2010-03-24 09:18:14 +00:00
Richard Frith-MacDonald
95f7b942b9 make non-standard images persist oafter theme has unloaded, in case anything
in the gui is still using them.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29851 72102866-910b-0410-8b05-ffd578937521
2010-03-05 10:43:40 +00:00
Richard Frith-MacDonald
2b38d4019a Updates for changes in base
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29839 72102866-910b-0410-8b05-ffd578937521
2010-03-05 05:18:39 +00:00
Eric Wasylishen
411d3e27bc NSColorWell themeing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29594 72102866-910b-0410-8b05-ffd578937521
2010-02-12 23:09:35 +00:00
Eric Wasylishen
e086eb3dbe Draw borders using image tiles, if available.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29503 72102866-910b-0410-8b05-ffd578937521
2010-02-07 21:42:50 +00:00
Eric Wasylishen
82d6f25159 Add GSThemeDisabledState
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29455 72102866-910b-0410-8b05-ffd578937521
2010-02-01 08:26:40 +00:00
Eric Wasylishen
1d764b8771 Use theme tiles (if available) to draw progress bars.
New tile name: GSProgressIndicatorBarDeterminate


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29453 72102866-910b-0410-8b05-ffd578937521
2010-02-01 06:20:11 +00:00
Eric Wasylishen
7225f6e380 Use theme tiles (if available) to draw menu backgrounds and items.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29447 72102866-910b-0410-8b05-ffd578937521
2010-01-30 05:00:29 +00:00
Eric Wasylishen
ffc734898c Use theme tiles (if available) to draw table headers. New tile names are
GSTableHeader and GSTableCorner.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29444 72102866-910b-0410-8b05-ffd578937521
2010-01-29 22:21:34 +00:00
Eric Wasylishen
a3835dbe56 Add support for looking up button tiles based on bezel style
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29441 72102866-910b-0410-8b05-ffd578937521
2010-01-29 08:08:10 +00:00
David Chisnall
3c7a52388a Made GSTheme implement fast forwarding. Should speed things up a lot with the new ABI.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29052 72102866-910b-0410-8b05-ffd578937521
2009-11-23 23:13:26 +00:00
Richard Frith-MacDonald
47f9930e07 tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29044 72102866-910b-0410-8b05-ffd578937521
2009-11-20 13:36:46 +00:00
Richard Frith-MacDonald
9abe733e93 tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29043 72102866-910b-0410-8b05-ffd578937521
2009-11-20 12:55:57 +00:00