mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
Minor menu adjustments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c20c328da9
commit
054846e3ea
3 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-02-16 Richard Frith-Macdoanld <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSMenuItemCell.m: fixup glitch with drawing of horizontal
|
||||||
|
menu items overwriting menu border.
|
||||||
|
* Source/NSMenuView.m: use menubar font size to calculate menubar
|
||||||
|
height.
|
||||||
|
|
||||||
2007-02-16 Sergii Stoian <stoyan255@gmail.com>
|
2007-02-16 Sergii Stoian <stoyan255@gmail.com>
|
||||||
|
|
||||||
* Headers/AppKit/NSTextView.h: Enable disabled insertion point
|
* Headers/AppKit/NSTextView.h: Enable disabled insertion point
|
||||||
|
|
|
@ -530,7 +530,10 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
||||||
{
|
{
|
||||||
if ([_menuView isHorizontal] == YES)
|
if ([_menuView isHorizontal] == YES)
|
||||||
{
|
{
|
||||||
// FIXME: No idea why this adjustment is needed.
|
/* A horizontal menu does not have borders drawn by the cell,
|
||||||
|
* but it does have a border round the menu as a whole, so we
|
||||||
|
* must inset from that.
|
||||||
|
*/
|
||||||
return NSMakeRect (theRect.origin.x, theRect.origin.y + 2,
|
return NSMakeRect (theRect.origin.x, theRect.origin.y + 2,
|
||||||
theRect.size.width, theRect.size.height - 2);
|
theRect.size.width, theRect.size.height - 2);
|
||||||
}
|
}
|
||||||
|
@ -585,6 +588,14 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
||||||
- (void) drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
- (void) drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||||
inView: (NSView *)controlView
|
inView: (NSView *)controlView
|
||||||
{
|
{
|
||||||
|
if ([_menuView isHorizontal] == YES)
|
||||||
|
{
|
||||||
|
cellFrame = [self drawingRectForBounds: cellFrame];
|
||||||
|
[[self backgroundColor] set];
|
||||||
|
NSRectFill(cellFrame);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Set cell's background color
|
// Set cell's background color
|
||||||
[[self backgroundColor] set];
|
[[self backgroundColor] set];
|
||||||
NSRectFill(cellFrame);
|
NSRectFill(cellFrame);
|
||||||
|
|
|
@ -132,7 +132,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
|
|
||||||
if (height == 0.0)
|
if (height == 0.0)
|
||||||
{
|
{
|
||||||
NSFont *font = [NSFont menuFontOfSize: 0.0];
|
NSFont *font = [NSFont menuBarFontOfSize: 0.0];
|
||||||
|
|
||||||
height = [font boundingRectForFont].size.height;
|
height = [font boundingRectForFont].size.height;
|
||||||
if (height < 22)
|
if (height < 22)
|
||||||
|
@ -911,8 +911,6 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
|
|
||||||
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
|
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
|
||||||
|
|
||||||
/* FIXME: handle vertical case? */
|
|
||||||
|
|
||||||
return aRect.rect;
|
return aRect.rect;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue