mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Tab height with close button under GTK2
This commit is contained in:
parent
23ae09ee75
commit
e2d69d4c96
1 changed files with 26 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, Controls, ComCtrls, LMessages,
|
||||
LCLType, Forms,
|
||||
uFileView, uFilePanelSelect, uDCVersion, DCXmlConfig;
|
||||
uFileView, uFilePanelSelect, DCXmlConfig;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -126,6 +126,8 @@ type
|
|||
|
||||
procedure DoCloseTabClicked(APage: TCustomPage); override;
|
||||
|
||||
function GetMinimumTabHeight: Integer; override;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
{en
|
||||
Removes the rectangle of the pages contents from erasing background to reduce flickering.
|
||||
|
|
@ -223,7 +225,7 @@ uses
|
|||
uColumnsFileView,
|
||||
uArchiveFileSource
|
||||
{$IF DEFINED(LCLGTK2)}
|
||||
, Glib2, Gtk2
|
||||
, Glib2, Gtk2, Gtk2Proc, Gtk2Def
|
||||
{$ENDIF}
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
, win32proc, Windows, Messages
|
||||
|
|
@ -551,6 +553,28 @@ begin
|
|||
Invalidate;
|
||||
end;
|
||||
|
||||
function TFileViewPageControl.GetMinimumTabHeight: Integer;
|
||||
{$IF DEFINED(LCLGTK2)}
|
||||
var
|
||||
PageWidget: PGtkWidget;
|
||||
NoteBookWidget: PGtkNotebook;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result:= inherited GetMinimumTabHeight;
|
||||
{$IF DEFINED(LCLGTK2)}
|
||||
if HandleAllocated then
|
||||
begin
|
||||
NoteBookWidget:= {%H-}PGtkNotebook(Handle);
|
||||
if Assigned(NoteBookWidget) then
|
||||
begin
|
||||
PageWidget:= gtk_notebook_get_nth_page(NoteBookWidget, 0);
|
||||
if Assigned(PageWidget) then
|
||||
Result:= Max(Result, PageWidget^.allocation.y);
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TFileViewPageControl.DoChange;
|
||||
begin
|
||||
inherited DoChange;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue