mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 06:31:07 +02:00
Gtk2: implemented SM_CYMENU system metric.
git-svn-id: trunk@35301 -
This commit is contained in:
parent
045a3558a4
commit
7cf5618863
@ -7696,9 +7696,14 @@ begin
|
||||
StyleObject^.Widget := GTK_RADIO_BUTTON_NEW(nil);
|
||||
end
|
||||
else
|
||||
If CompareText(WName,LazGtkStyleNames[lgsMenu])=0 then begin
|
||||
if CompareText(WName,LazGtkStyleNames[lgsMenu])=0 then
|
||||
begin
|
||||
lgs:=lgsMenu;
|
||||
StyleObject^.Widget := gtk_menu_new;
|
||||
// we need REAL menu size for SM_CYMENU
|
||||
// menuitem will be destroyed with menu by gtk.
|
||||
VBox := gtk_menu_item_new_with_label('DUMMYITEM');
|
||||
gtk_menu_shell_append(PGtkMenuShell(StyleObject^.Widget), VBox);
|
||||
end
|
||||
else
|
||||
If CompareText(WName,LazGtkStyleNames[lgsMenuBar])=0 then begin
|
||||
|
@ -5578,7 +5578,17 @@ begin
|
||||
end;
|
||||
SM_CYMENU:
|
||||
begin
|
||||
//DebugLn('Trace:TODO: [TGtk2WidgetSet.GetSystemMetrics] --> SM_CYMENU ');
|
||||
Result := 24; // default gtk2 menusize inside menubar.
|
||||
|
||||
P := GetStyleWidget(lgsMenu);
|
||||
if P <> nil then
|
||||
begin
|
||||
Result := GTK_Widget(P)^.requisition.Height;
|
||||
|
||||
P := GetStyleWidget(lgsMenuBar);
|
||||
if P <> nil then
|
||||
Result := Result + GTK_Widget(P)^.requisition.Height;
|
||||
end;
|
||||
end;
|
||||
SM_CYSMCAPTION:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user