mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 21:29:26 +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 indexOf(const AWidget: QWidgetH): integer;
|
||||||
function insertTab(index: Integer; page: QWidgetH; p2: WideString): Integer; overload;
|
function insertTab(index: Integer; page: QWidgetH; p2: WideString): Integer; overload;
|
||||||
function insertTab(index: Integer; page: QWidgetH; icon: QIconH; p2: WideString): Integer; overload;
|
function insertTab(index: Integer; page: QWidgetH; icon: QIconH; p2: WideString): Integer; overload;
|
||||||
|
function getClientBounds: TRect; override;
|
||||||
function getCurrentIndex: Integer;
|
function getCurrentIndex: Integer;
|
||||||
function getTabPosition: QTabWidgetTabPosition;
|
function getTabPosition: QTabWidgetTabPosition;
|
||||||
procedure removeTab(AIndex: Integer);
|
procedure removeTab(AIndex: Integer);
|
||||||
@ -5559,6 +5560,26 @@ begin
|
|||||||
Result := QTabWidget_insertTab(QTabWidgetH(Widget), index, page, @p2);
|
Result := QTabWidget_insertTab(QTabWidgetH(Widget), index, page, @p2);
|
||||||
end;
|
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;
|
function TQtTabWidget.getCurrentIndex: Integer;
|
||||||
begin
|
begin
|
||||||
Result := QTabWidget_currentIndex(QTabWidgetH(Widget));
|
Result := QTabWidget_currentIndex(QTabWidgetH(Widget));
|
||||||
|
Loading…
Reference in New Issue
Block a user