Commit graph

33 commits

Author SHA1 Message Date
Fred Kiefer
59fa666263 * Tests/gui/NSView/NSView_autoresize_and_rounding.m: Add tests
for centerScanRect: with flipped view.
        * Source/NSView.m (-centerScanRect:): Change to get the failed
        tests to pass.
        * Source/GSThemeTools.m (-drawRoundBezel:withColor:): Make round
        bezel look a bit nicer.
        * Source/NSButtonCell.m (-drawImage:withFrame:inView:): Use
        centerScanRect: instead of similar code.
        * Source/NSCell.m: Use imageRectForBounds: and
        titleRectForBounds: in drawInteriorWithFrame:inView:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38929 72102866-910b-0410-8b05-ffd578937521
2015-08-25 21:33:04 +00:00
Eric Wasylishen
d9da770d5b * Source/GSThemeDrawing.m:
* Source/GSThemeTools.m:
	* Headers/Additions/GNUstepGUI/GSTheme.h: Small refactor:
	most uses of -[GSTheme fillRect:withTiles:background:] use
	[NSColor clearColor], so add a version without the background:
	param.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37244 72102866-910b-0410-8b05-ffd578937521
2013-10-16 07:19:45 +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
1411fdfa3a * Source/GSThemeTools.m: Fix unflipped/flipped coordinates bug
in the 9-patch content rect parsing code. Add some comments.
Simplify contentRectForRect: implementation.
* Source/GSThemeDrawing.m (-browserHeaderDrawingRectForCell:...):
Use -contentRectForRect: to get the content rect instead of
incorrectly reading from ivar. Fixes broken text positioning
in browser header with Nesedah theme.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37217 72102866-910b-0410-8b05-ffd578937521
2013-10-12 04:33:59 +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
Fred Kiefer
e62fddeea0 Change NSBezierPath to use NSInteger and CGFloat and adjust uses to
this.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36054 72102866-910b-0410-8b05-ffd578937521
2013-02-01 14:03:08 +00:00
Eric Wasylishen
25c6770196 * Source/NSBitmapImageRep.m:
* Source/NSColor.m:
* Source/GSThemeTools.m:
* Source/NSGraphicsContext.m:
* Headers/AppKit/NSColor.h:
* Headers/AppKit/NSGraphicsContext.h:
* ColorPickers/GSGrayColorPicker.m:
* ColorPickers/GSCMYKColorPicker.m:
* ColorPickers/GSWheelColorPicker.m:
* ColorPickers/GSRGBColorPicker.m:
* ColorPickers/GSHSBColorPicker.m: Migrate float to CGFloat in
NSColor


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34070 72102866-910b-0410-8b05-ffd578937521
2011-10-26 00:21:57 +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
Eric Wasylishen
3402d1c500 * Source/GSThemeTools.m: Correct implementation of contentRectForRect
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29424 72102866-910b-0410-8b05-ffd578937521
2010-01-27 23:17:37 +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
Fred Kiefer
fff49a33bf Another patch by Eric Wasylishen correcting the GSThemeTools tile
rectangles.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29121 72102866-910b-0410-8b05-ffd578937521
2009-12-14 14:02:09 +00:00
Fred Kiefer
b8d68dcdbb Apply patch by Eric Wasylishen to correct the orientation of colorAtX:y:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29120 72102866-910b-0410-8b05-ffd578937521
2009-12-14 13:26: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
268d76327b make last change conditional on mingw
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28926 72102866-910b-0410-8b05-ffd578937521
2009-10-31 06:13:16 +00:00
Richard Frith-MacDonald
0400de2215 get things working on mingw again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28925 72102866-910b-0410-8b05-ffd578937521
2009-10-30 20:32:24 +00:00
Nicolas Roard
3440beb9a6 Re-enabled extracting the images in GSDrawTiles after fixing the matrix drawing style, making the nine patch drawing method work again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28866 72102866-910b-0410-8b05-ffd578937521
2009-10-22 12:27:34 +00:00
Richard Frith-MacDonald
1fdedc3487 more fixyps for breakage in recent drawing changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28855 72102866-910b-0410-8b05-ffd578937521
2009-10-19 18:46:44 +00:00
Richard Frith-MacDonald
0774868696 Get theme tile drawing working again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28851 72102866-910b-0410-8b05-ffd578937521
2009-10-19 14:21:05 +00:00
Richard Frith-MacDonald
028062089d fix typo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28847 72102866-910b-0410-8b05-ffd578937521
2009-10-19 11:02:27 +00:00
Richard Frith-MacDonald
d2e616cb73 minor fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28843 72102866-910b-0410-8b05-ffd578937521
2009-10-19 07:44:22 +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
Nicolas Roard
83a8dccb97 Fix drawing bug when painting Top-Middle and Bottom-Middle images in GSDrawTiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28840 72102866-910b-0410-8b05-ffd578937521
2009-10-18 18:35:24 +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
Gregory John Casamento
debe8f5801 * Source/GSThemeTools.m: -[GSThemeTools drawRoundBezel:withColor:]
add code to draw highlights for rounded buttons to give them a 
	better 3D look.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28421 72102866-910b-0410-8b05-ffd578937521
2009-07-30 19:42:21 +00:00
Richard Frith-MacDonald
96d993adde Add checks of tile sizes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27803 72102866-910b-0410-8b05-ffd578937521
2009-02-07 08:59:39 +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
907b7a60e1 Small bugfix and performance optimisation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27735 72102866-910b-0410-8b05-ffd578937521
2009-01-30 16:27:36 +00:00
Richard Frith-MacDonald
f0a1421d50 Changes to make system colors easier to manage
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27449 72102866-910b-0410-8b05-ffd578937521
2008-12-29 11:49:42 +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