mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:36:27 +02:00
Cocoa: in TCustomComboBox (TCocoaReadOnlyComboBox) with OwnerDraw, fix the issue that popupButton are covered
This commit is contained in:
parent
3b1a924a6d
commit
21803721f8
@ -47,6 +47,7 @@ const
|
|||||||
COMBOBOX_RO_SMALL_HEIGHT = 17;
|
COMBOBOX_RO_SMALL_HEIGHT = 17;
|
||||||
COMBOBOX_RO_MINI_HEIGHT = 15;
|
COMBOBOX_RO_MINI_HEIGHT = 15;
|
||||||
|
|
||||||
|
COMBOBOX_RO_BUTTON_WIDTH = 20;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -1760,8 +1761,9 @@ begin
|
|||||||
// (however, one should be careful and take layout offsets into account!)
|
// (however, one should be careful and take layout offsets into account!)
|
||||||
// on the other hand, "cells" themselves are being deprecated...
|
// on the other hand, "cells" themselves are being deprecated...
|
||||||
dr := lclFrame;
|
dr := lclFrame;
|
||||||
|
dr.Width:= dr.Width - COMBOBOX_RO_BUTTON_WIDTH;
|
||||||
Types.OffsetRect(dr, -dr.Left, -dr.Top);
|
Types.OffsetRect(dr, -dr.Left, -dr.Top);
|
||||||
SubLayoutFromFrame( lclGetFrameToLayoutDelta, dr);
|
//SubLayoutFromFrame( lclGetFrameToLayoutDelta, dr);
|
||||||
ctx.InitDraw(dr.Width, dr.Height);
|
ctx.InitDraw(dr.Width, dr.Height);
|
||||||
|
|
||||||
// magic offsets are based on the macOS 10.13.6 visual style
|
// magic offsets are based on the macOS 10.13.6 visual style
|
||||||
|
Loading…
Reference in New Issue
Block a user