NSComboBox like point size in TextEdit

2020-01-29 Thread Lars C. Hassing via Cocoa-dev
I want my NSComboBox to behave like the point size combo in TextEdit: User places cursor in the combobox textfield, User presses arrow down - the menu opens User presses arrow down several times stepping down in the menu. User presses Enter to select the highlighted point size. - or user presses

Preventing app from being restored or saving info in "Saved Application State"

2019-11-10 Thread Lars C. Hassing via Cocoa-dev
I have developed two Cocoa apps, one launching the other helper app. If number two app crashes then macOS may ask the user if he wants to relaunch it, but it makes no sense launching it on its own, because it must be launched in a controlled manner and environment from the first app. I believe

Re: Thoughts on Cocoa

2019-10-04 Thread Lars C. Hassing via Cocoa-dev
On 4 Oct 2019, at 21.00, Jens Alfke wrote: The people I hear complaining about this are those who, like you, didn't move to Cocoa. Carbon was a _temporary_ transition API*. It was necessary when Mac OS X shipped in March 2001, but even though it wasn't yet formally deprecated, it was clear it

Re: disabledControlTextColor magic ?

2019-03-07 Thread Lars C. Hassing
That is 0.48 /Lars Den 7. mar. 2019 kl. 21.31 skrev Lars C. Hassing mailto:l...@ccieurope.com>>: I thought that disabledControlTextColor was gray, but it is black with an alpha of 0.8! ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Re: disabledControlTextColor magic ?

2019-03-07 Thread Lars C. Hassing
(5,5,20,20), NSCompositingOperationSourceOver); made it work! /Lars Den 7. mar. 2019 kl. 20.33 skrev Lars C. Hassing mailto:l...@ccieurope.com>>: I wanted to take a good look at disabledControlTextColor (and othe system colors), so I made a small test view with - (void)drawRect:(NSRect)dirtyRec

disabledControlTextColor magic ?

2019-03-07 Thread Lars C. Hassing
I wanted to take a good look at disabledControlTextColor (and othe system colors), so I made a small test view with - (void)drawRect:(NSRect)dirtyRect { [[NSColor windowBackgroundColor] set]; NSRectFill(dirtyRect); NSColor *c = [NSColor disabledControlTextColor]; [c set];

Re: Custom NSButton image effects for pressed/disabled

2018-12-12 Thread Lars C. Hassing
Clever idea creating an image with the two images and the title in it, but then the title would be pressed/darkened too and not shown in white on blue background… /Lars > Den 13. dec. 2018 kl. 01.46 skrev Jens Alfke : > > > >> On Dec 11, 2018, at 5:03 PM, Lars C. Hassing

Re: Custom NSButton image effects for pressed/disabled

2018-12-12 Thread Lars C. Hassing
in various states to help developers achieve a consistent look and feel, why wouldn’t Cocoa be interested in supporting that? /Lars > Den 12. dec. 2018 kl. 02.03 skrev Lars C. Hassing : > > If I assign an image to an NSButton it is displayed with nice pressed and > disabled effects. >

Custom NSButton image effects for pressed/disabled

2018-12-11 Thread Lars C. Hassing
If I assign an image to an NSButton it is displayed with nice pressed and disabled effects. In my custom NSButton, that should display image1+title+image2, I override drawRect:, but how do I obtain the EXACT SAME system effects for the two images? I plan to use NSImage