Commit graph

16 commits

Author SHA1 Message Date
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
a4fa237d9e * Source/GSThemePrivate.h:
* Source/GSThemeTools.m:
	* Source/GSThemeDrawing.m: Add explicit isFlipped: param to
	-[GSDrawTiles contentRectForRect:]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37239 72102866-910b-0410-8b05-ffd578937521
2013-10-16 03:36:01 +00:00
Eric Wasylishen
bd3426dd41 * Source/GSThemeTools.m (-initWithNinePatchImage:): Parse the
"optiacal bounds" metadata in 9-patch images. It's stored
in the layoutRect ivar but not used otherwise.

See "Optical bounds layout" section of:
http://developer.android.com/about/versions/android-4.3.html
* Source/GSThemePrivate.h (GSDrawTiles): Add layoutRect ivar


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37219 72102866-910b-0410-8b05-ffd578937521
2013-10-12 18:24:33 +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
fb723f8241 * Source/GSThemeDrawing.m: Use new -[GSDrawTiles themeMargins]
to get the margins for draw tiles.
* Source/GSThemePrivate.h:
* Source/GSThemeTools.m: Get the 9-patch content rect support
working from end-to-end.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37191 72102866-910b-0410-8b05-ffd578937521
2013-10-03 22:24:57 +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
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
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
Eric Wasylishen
7e7909125f Support for the padding box/content rect feature of Nine Patch theme tiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29423 72102866-910b-0410-8b05-ffd578937521
2010-01-27 22:43:21 +00:00
Nicolas Roard
93047c95c1 Remove commented code and spurious NSLogs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28842 72102866-910b-0410-8b05-ffd578937521
2009-10-19 03:23:24 +00:00
Nicolas Roard
36e94f001e Added 'NinePatch' drawing style, more efficient drawing and fixed bugs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28841 72102866-910b-0410-8b05-ffd578937521
2009-10-19 03:19:01 +00:00
Richard Frith-MacDonald
a49d3efb05 give theme more control over drawing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28839 72102866-910b-0410-8b05-ffd578937521
2009-10-18 16:23:34 +00:00
Nicolas Roard
2c3f0453ee Refactoring of GSDrawTiles to let it draw itself, and added a new init method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28838 72102866-910b-0410-8b05-ffd578937521
2009-10-18 14:21:57 +00:00
Richard Frith-MacDonald
570b8a4963 Reorganize location of theme proxy code. Add some more comments too.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27831 72102866-910b-0410-8b05-ffd578937521
2009-02-10 14:32:08 +00:00
Richard Frith-MacDonald
01578fe688 Some image tiling improvments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27801 72102866-910b-0410-8b05-ffd578937521
2009-02-06 15:08:14 +00:00
Richard Frith-MacDonald
539faec0d3 clean up somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27448 72102866-910b-0410-8b05-ffd578937521
2008-12-29 10:28:59 +00:00