mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 16:19:36 +02:00
Qt: reverted patch for #12230 (introduced more size problems), bug reopened, will be fixed in 0.9.27 ...
git-svn-id: trunk@16722 -
This commit is contained in:
parent
4f0d06645d
commit
c61a173237
@ -640,6 +640,7 @@ type
|
||||
function indexOf(const AWidget: QWidgetH): integer;
|
||||
function insertTab(index: Integer; page: QWidgetH; p2: WideString): Integer; overload;
|
||||
function insertTab(index: Integer; page: QWidgetH; icon: QIconH; p2: WideString): Integer; overload;
|
||||
function getClientBounds: TRect; override;
|
||||
function getCurrentIndex: Integer;
|
||||
function getTabPosition: QTabWidgetTabPosition;
|
||||
procedure removeTab(AIndex: Integer);
|
||||
@ -5559,6 +5560,26 @@ begin
|
||||
Result := QTabWidget_insertTab(QTabWidgetH(Widget), index, page, @p2);
|
||||
end;
|
||||
|
||||
function TQtTabWidget.getClientBounds: TRect;
|
||||
var
|
||||
ATabSize: TSize;
|
||||
option: QStyleOptionTabWidgetFrameH;
|
||||
begin
|
||||
option := QStyleOptionTabWidgetFrame_create();
|
||||
QStyleOption_initFrom(QStyleOptionH(option), Widget);
|
||||
QStyle_subElementRect(QWidget_style(Widget), @Result, QStyleSE_TabWidgetTabContents, option, Widget);
|
||||
QStyleOptionTabWidgetFrame_destroy(option);
|
||||
|
||||
QWidget_size(TabBar, @ATabSize);
|
||||
case getTabPosition of
|
||||
QTabWidgetNorth: inc(Result.Top, ATabSize.cy);
|
||||
QTabWidgetSouth: dec(Result.Bottom, ATabSize.cy);
|
||||
QTabWidgetWest : inc(Result.Left, ATabSize.cx);
|
||||
QTabWidgetEast : dec(Result.Right, ATabSize.cx);
|
||||
end;
|
||||
//WriteLn(dbgs(Result));
|
||||
end;
|
||||
|
||||
function TQtTabWidget.getCurrentIndex: Integer;
|
||||
begin
|
||||
Result := QTabWidget_currentIndex(QTabWidgetH(Widget));
|
||||
|
Loading…
Reference in New Issue
Block a user