mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
Fixed more fontpanel drawing...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3978 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3071d5e99f
commit
b545ec2ee9
1 changed files with 17 additions and 4 deletions
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gnustep/gui/config.h>
|
#include <gnustep/gui/config.h>
|
||||||
|
#include <AppKit/NSFont.h>
|
||||||
#include <AppKit/NSFontPanel.h>
|
#include <AppKit/NSFontPanel.h>
|
||||||
#include <AppKit/NSFontManager.h>
|
#include <AppKit/NSFontManager.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
#include <AppKit/NSColor.h>
|
#include <AppKit/NSColor.h>
|
||||||
#include <AppKit/NSPanel.h>
|
#include <AppKit/NSPanel.h>
|
||||||
#include <AppKit/NSButton.h>
|
#include <AppKit/NSButton.h>
|
||||||
|
#include <AppKit/NSBox.h>
|
||||||
|
|
||||||
@implementation NSFontPanel
|
@implementation NSFontPanel
|
||||||
|
|
||||||
|
@ -78,7 +80,7 @@
|
||||||
NSRect pa = {{7,0}, {286,50}};
|
NSRect pa = {{7,0}, {286,50}};
|
||||||
NSRect l = {{7,162}, {110,20}};
|
NSRect l = {{7,162}, {110,20}};
|
||||||
NSRect ss = {{7,0}, {110,160}};
|
NSRect ss = {{7,0}, {110,160}};
|
||||||
NSRect b = {{60,5}, {75,25}};
|
NSRect b = {{58,5}, {75,25}};
|
||||||
NSView *v;
|
NSView *v;
|
||||||
NSView *topArea;
|
NSView *topArea;
|
||||||
NSView *bottomArea;
|
NSView *bottomArea;
|
||||||
|
@ -93,8 +95,10 @@
|
||||||
NSButton *setButton;
|
NSButton *setButton;
|
||||||
NSButton *revertButton;
|
NSButton *revertButton;
|
||||||
NSButton *previewButton;
|
NSButton *previewButton;
|
||||||
|
NSBox *slash;
|
||||||
|
|
||||||
unsigned int style = NSTitledWindowMask;
|
unsigned int style = NSTitledWindowMask | NSClosableWindowMask
|
||||||
|
| NSMiniaturizableWindowMask | NSResizableWindowMask;
|
||||||
|
|
||||||
self = [super initWithContentRect:pf
|
self = [super initWithContentRect:pf
|
||||||
styleMask:style
|
styleMask:style
|
||||||
|
@ -124,6 +128,7 @@
|
||||||
[label setAlignment: NSCenterTextAlignment];
|
[label setAlignment: NSCenterTextAlignment];
|
||||||
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
||||||
[label setStringValue:@"Family"];
|
[label setStringValue:@"Family"];
|
||||||
|
[label setEditable:NO];
|
||||||
[label setDrawsBackground:YES];
|
[label setDrawsBackground:YES];
|
||||||
[label setTextColor:[NSColor whiteColor]];
|
[label setTextColor:[NSColor whiteColor]];
|
||||||
[label setBackgroundColor:[NSColor darkGrayColor]];
|
[label setBackgroundColor:[NSColor darkGrayColor]];
|
||||||
|
@ -138,6 +143,7 @@
|
||||||
|
|
||||||
label = [[NSTextField alloc] initWithFrame:l];
|
label = [[NSTextField alloc] initWithFrame:l];
|
||||||
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
||||||
|
[label setEditable:NO];
|
||||||
[label setAlignment: NSCenterTextAlignment];
|
[label setAlignment: NSCenterTextAlignment];
|
||||||
[label setDrawsBackground:YES];
|
[label setDrawsBackground:YES];
|
||||||
[label setTextColor:[NSColor whiteColor]];
|
[label setTextColor:[NSColor whiteColor]];
|
||||||
|
@ -159,6 +165,7 @@
|
||||||
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
[label setFont:[NSFont boldSystemFontOfSize:12]];
|
||||||
[label setAlignment: NSCenterTextAlignment];
|
[label setAlignment: NSCenterTextAlignment];
|
||||||
[label setDrawsBackground:YES];
|
[label setDrawsBackground:YES];
|
||||||
|
[label setEditable:NO];
|
||||||
[label setTextColor:[NSColor whiteColor]];
|
[label setTextColor:[NSColor whiteColor]];
|
||||||
[label setBackgroundColor:[NSColor darkGrayColor]];
|
[label setBackgroundColor:[NSColor darkGrayColor]];
|
||||||
[label setStringValue:@"Size"];
|
[label setStringValue:@"Size"];
|
||||||
|
@ -186,18 +193,24 @@
|
||||||
[bottomSplit addSubview:sizeScroll];
|
[bottomSplit addSubview:sizeScroll];
|
||||||
|
|
||||||
bottomArea = [[NSView alloc] initWithFrame:NSMakeRect(0,0,300,100)];
|
bottomArea = [[NSView alloc] initWithFrame:NSMakeRect(0,0,300,100)];
|
||||||
|
|
||||||
|
slash = [[NSBox alloc] initWithFrame:NSMakeRect(0,40,300,2)];
|
||||||
|
[slash setBorderType:NSLineBorder];
|
||||||
|
[bottomArea addSubview:slash];
|
||||||
|
[slash release];
|
||||||
|
|
||||||
revertButton = [[NSButton alloc] initWithFrame:b];
|
revertButton = [[NSButton alloc] initWithFrame:b];
|
||||||
[revertButton setStringValue:@"Revert"];
|
[revertButton setStringValue:@"Revert"];
|
||||||
[bottomArea addSubview:revertButton];
|
[bottomArea addSubview:revertButton];
|
||||||
|
|
||||||
b.origin.x = 140;
|
b.origin.x = 138;
|
||||||
|
|
||||||
previewButton = [[NSButton alloc] initWithFrame:b];
|
previewButton = [[NSButton alloc] initWithFrame:b];
|
||||||
[previewButton setStringValue:@"Preview"];
|
[previewButton setStringValue:@"Preview"];
|
||||||
|
[previewButton setButtonType:NSOnOffButton];
|
||||||
[bottomArea addSubview:previewButton];
|
[bottomArea addSubview:previewButton];
|
||||||
|
|
||||||
b.origin.x = 220;
|
b.origin.x = 218;
|
||||||
|
|
||||||
setButton = [[NSButton alloc] initWithFrame:b];
|
setButton = [[NSButton alloc] initWithFrame:b];
|
||||||
[setButton setStringValue:@"Set"];
|
[setButton setStringValue:@"Set"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue