[futurebasic] Re: [FB] Graphite or Blue (carbon X)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2003 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Mon, 9 Jun 2003 22:22:38 -0400
On Monday, June 9, 2003, at 06:51  PM, Robert Purves wrote:

> On Thursday, June 5, 2003, Robert Covington wrote:
>> Is there a way to know if a user has their machine set to use 
>> Graphite vs Blue Appearance in their OSX  General Prefs color pref?
>> I would like to tailor a dialog graphic to reflect such.
> I hoped that GetThemeBrushAsColor would give a hint to the tint. It 
> seems that only _kThemeBrushFocusHighlight indicates the Blue or 
> Graphite effect in OS X.  It's disappointing that the various button 
> brushes (_kThemeBrushButtonXXXX) are shown as gray even if Blue is in 
> effect.  Still the demo is not totally without interest.

Thanks RP. Nice demo. Here's my cheater method. This no doubt has 54 
problem potentials, but works just fine here at least :)

// Short demo

DIM themeRGB as RGBcolor
if themeRGB.blue/255 > 200 then Stop ¬
"Theme is Aqua True Blue" Else Stop ¬
"Theme is Aqua Graphite"

Testing the rect from _kThemeBrushFocusHighlight would do the same 
though I can see and no doubt be more reliable, I just wanted to write 
that song for the below longer demo. :)

But the case check for the blue channel would work for that as well 
judging from my Photoshop samples, within range.


// Long Demo
// Theme Getter, The Slick Cheat
// Only good if that Apple doesn't move.  :)

// FB3 CARBON only, running in OSX.

//   Robert Bob Covington Bob

DIM themeRGB as RGBcolor

GetCPixel(28,12,@themeRGB)//  77/142/230  here in True Blue, 
136/150/171 in Graphite

Window 1

Print themeRGB.red/255
Print themeRGB.green/255
Print themeRGB.blue/255
Select themeRGB.blue/255 // Love Dat Blue
case > 200
Print " We are in Deep Blue Aqua"
Case < 200
Print " We are in Graphite Aqua"
End Select

Print " Sing to old 80's tune:";
Text _geneva,9,_italicbit%
Print " We love the night life. We like to boogie. "
Print " We like to dance with GetCPixel, Aqua hours."

until 0