View Issue Details

IDProjectCategoryView StatusLast Update
0033626LazarusLCLpublic2018-07-15 16:56
ReporterChris RordenAssigned ToDmitry Boyarintsev 
Status closedResolutionfixed 
PlatformMacBook 2012 Retina 13"OSDarwinOS Version10.11.6
Product Version1.9 (SVN)Product Build57681 
Target VersionFixed in Version 
Summary0033626: Cocoa: TComboBox re-sizing
DescriptionThe default text and widget size is different for Cocoa than other widget sets, providing a native look and feel. Consider a TComboBox dropped on a form: if you try to set the height to 23, the Cocoa IDE elegantly constrains the height to 26, matching the minimum height. Likewise, if you use an auto-generated form and specify a height of 23 pixels, the widget is rescaled to be 26 pixels high the first time the form is shown. However, on subsequent viewing, there is an error, as the widget is shown with the incorrect size.

This may be related to issue 33616: in both instances the form looks correct when first displayed, but looks incorrect when closed and shown a second time.
Steps To ReproduceCompile the IDE for Cocoa. Launch the IDE and choose the Search/Find menu item - notice all appears fine. Close the Find window and choose Search/Find a 2nd time. Note the TextToFindComboBox TComboBox now appears too small to show all the text. The first time the form was shown, this combobox was resized to 26-pixels high, however the second time it is displayed as the 23-pixel Height specified in findreplacedialog.lfm.

TagsNo tags attached.
Fixed in Revision58529
Attached Files


related to 0030300 closedFelipe Monteiro de Carvalho TLabels always drawn in Italics regardless of fsItalic (Cocoa LCL only) 


Chris Rorden

2018-04-21 13:49


cocoa_find.png (29,614 bytes)
cocoa_find.png (29,614 bytes)

Dmitry Boyarintsev

2018-07-15 07:15

developer   ~0109483

please test and close if ok

the fix actually reverts fix made for 0030300, regression testing is advised.

Dmitry Boyarintsev

2018-07-15 07:23

developer   ~0109484

This appears to be Cocoa issue, rather than Cocoa-Widgetset issue.

Here's a simple test - open up Xcode, bring up Interface Builder.
(add a form)
place NSComboBox on the form.
go to "Attributes Inspector"
and select a font other than "System"
(it's also possible to adjust "System" by clicking on [T] icon and changing the font size on the opened font dialog)

as a result you should see the combobox showing the text with the ugly offset.

Dmitry Boyarintsev

2018-07-15 07:24


Chris Rorden

2018-07-15 13:35


editor_R58529.png (34,811 bytes)
editor_R58529.png (34,811 bytes)

Chris Rorden

2018-07-15 13:46

reporter   ~0109489

Revision 58529 fixes the problem, but has a major regression: SynEdit now appears to use the proportional System font with wide fixed spacing (see screenshot). One should be able to select a custom typeface using Tools/Options/Editor/Display, however with 58529 the SynEdit uses the system font regardless of what the user specifies. So while it seems that the NSComboBox is required to use the System font, enforcing this for other components may have undesirable consequences.

The whole IDE becomes unstable with later revisions and spontaneously crashes after launch. However, I believe that is unrelated to this patch.

Dmitry Boyarintsev

2018-07-15 16:17

developer   ~0109492

synedit font problem is resolved with r58531

Issue History

Date Modified Username Field Change
2018-04-21 13:49 Chris Rorden New Issue
2018-04-21 13:49 Chris Rorden File Added: cocoa_find.png
2018-07-15 07:09 Dmitry Boyarintsev Relationship added related to 0030300
2018-07-15 07:15 Dmitry Boyarintsev Fixed in Revision => 58529
2018-07-15 07:15 Dmitry Boyarintsev LazTarget => -
2018-07-15 07:15 Dmitry Boyarintsev Note Added: 0109483
2018-07-15 07:15 Dmitry Boyarintsev Status new => resolved
2018-07-15 07:15 Dmitry Boyarintsev Resolution open => fixed
2018-07-15 07:15 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2018-07-15 07:23 Dmitry Boyarintsev Note Added: 0109484
2018-07-15 07:24 Dmitry Boyarintsev File Added: Screen Shot 2018-07-15 at 1.19.18 AM.png
2018-07-15 13:35 Chris Rorden File Added: editor_R58529.png
2018-07-15 13:46 Chris Rorden Note Added: 0109489
2018-07-15 16:17 Dmitry Boyarintsev Note Added: 0109492
2018-07-15 16:56 Chris Rorden Status resolved => closed