From 4aec81bc53eb51508b13ae6e20a38e30b948c200 Mon Sep 17 00:00:00 2001 From: espectador Date: Fri, 12 Feb 2010 17:56:11 +0000 Subject: [PATCH] Search extra colors for the menu bar in the theme git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29591 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/GSTitleView.m | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04906fc8a..13f18ed2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-12 German Arias + + * Source/GSTitleView.m: Search in theme colors: GSMenuBar and + GSMenuBarTitle (both GSThemeNormalState). If not present, set + black and white respectively. + 2010-02-12 Wolfgang Lux * Source/NSTextView_actions.m (killBuffer, -deleteToEndOfLine:, diff --git a/Source/GSTitleView.m b/Source/GSTitleView.m index 18edae53a..68effd71b 100644 --- a/Source/GSTitleView.m +++ b/Source/GSTitleView.m @@ -142,11 +142,23 @@ NSDebugLLog(@"GSTitleView", @"owner is NSMenu"); _owner = owner; _ownedByMenu = YES; + NSColor *textColor; + GSTheme *theme = [GSTheme theme]; RELEASE (titleColor); - titleColor = RETAIN ([NSColor blackColor]); - [textAttributes setObject: [NSColor whiteColor] - forKey: NSForegroundColorAttributeName]; + titleColor = RETAIN ([theme colorNamed: @"GSMenuBar" state: GSThemeNormalState]); + if (titleColor == nil) + { + titleColor = RETAIN ([NSColor blackColor]); + } + + textColor = [theme colorNamed: @"GSMenuBarTitle" state: GSThemeNormalState]; + if (textColor == nil) + { + textColor = [NSColor whiteColor]; + } + [textAttributes setObject: textColor + forKey: NSForegroundColorAttributeName]; } else {