mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 21:50:46 +00:00
Small patches and a missing CVS entry.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22346 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
30d6b9f8f0
commit
584ab86e01
3 changed files with 52 additions and 14 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2006-01-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSPopupButtonCell.m (-synchronizeTitleAndSelectedItem):
|
||||||
|
Only select an item if one is highlighted.
|
||||||
|
* Source/Functions.m: NSFrameRectWithWidthUsingOperation() new
|
||||||
|
function from Cocoa. NSFrameRectWithWidth() different
|
||||||
|
implementation, no longer using stroke.
|
||||||
|
|
||||||
|
2006-01-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSTableHeaderCell.m: Simplified code by letting
|
||||||
|
the super classes do their job.
|
||||||
|
|
||||||
2006-01-14 Richard Frith-Macdonald <rfm@gnu.org>
|
2006-01-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSWindow.m: minor fixups for 64bit cpu support.
|
* Source/NSWindow.m: minor fixups for 64bit cpu support.
|
||||||
|
|
|
@ -474,14 +474,32 @@ void NSFrameRect(const NSRect aRect)
|
||||||
|
|
||||||
void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
|
void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
|
||||||
{
|
{
|
||||||
float width;
|
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSRect remainder = aRect;
|
||||||
DPScurrentlinewidth(ctxt, &width);
|
NSRect rects[4];
|
||||||
DPSsetlinewidth(ctxt, frameWidth);
|
int i;
|
||||||
DPSrectstroke(ctxt, NSMinX(aRect) + frameWidth / 2.0,
|
|
||||||
NSMinY(aRect) + frameWidth / 2.0,
|
for (i = 0; i < 4; i++)
|
||||||
NSWidth(aRect) - frameWidth, NSHeight(aRect) - frameWidth);
|
{
|
||||||
DPSsetlinewidth(ctxt, width);
|
NSDivideRect(remainder, &rects[i], &remainder, frameWidth, sides[i]);
|
||||||
|
}
|
||||||
|
NSRectFillList(rects, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth,
|
||||||
|
NSCompositingOperation op)
|
||||||
|
{
|
||||||
|
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
|
NSRect remainder = aRect;
|
||||||
|
NSRect rects[4];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
NSDivideRect(remainder, &rects[i], &remainder, frameWidth, sides[i]);
|
||||||
|
}
|
||||||
|
NSRectFillListUsingOperation(rects, 4, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSRect
|
NSRect
|
||||||
|
|
|
@ -531,12 +531,19 @@ static NSImage *_pbc_image[2];
|
||||||
{
|
{
|
||||||
index = [[_menu menuRepresentation] highlightedItemIndex];
|
index = [[_menu menuRepresentation] highlightedItemIndex];
|
||||||
|
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = [self indexOfSelectedItem];
|
{
|
||||||
if (index < 0)
|
// If no item is highighted, display the selected one ...
|
||||||
index = 0;
|
index = [self indexOfSelectedItem];
|
||||||
|
// ... if there is nown, then the first one, but don't select it.
|
||||||
[self selectItemAtIndex: index];
|
if (index < 0)
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Selected the highlighted item
|
||||||
|
[self selectItemAtIndex: index];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((index >= 0) && ([_menu numberOfItems] > index))
|
if ((index >= 0) && ([_menu numberOfItems] > index))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue