2025-08-17 18:27 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/gtqtc/gtqtc.h
  * contrib/gtqtc/gtqtc1.cpp
    + added support for disabling title and frames of console window by
         hb_gtInfo( HB_GTI_WINTITLE, <lNoFrame> )

  * src/rtl/transfrm.c
    ! fixed bug in "@S<n>" transformation when multibyte CDP is used
This commit is contained in:
Przemysław Czerpak
2025-08-17 18:27:35 +02:00
parent 57c06eb936
commit 1b633cd242
4 changed files with 66 additions and 12 deletions

View File

@@ -350,6 +350,7 @@ typedef struct
HB_BOOL fFullScreen; /* enable/disable fullscreen mode */
HB_BOOL fSelectCopy; /* allow marking texts by mouse left button with shift */
HB_BOOL fMsgAlert; /* redirect Alert() calls to QMessageBox */
HB_BOOL fNoFrame; /* disable window title and frames */
HB_BOOL fRepaint; /* force internal image repainting */
int iResizeMode; /* Sets the resizing mode either to FONT or ROWS */

View File

@@ -2150,11 +2150,41 @@ static HB_BOOL hb_gt_qtc_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_WINTITLE:
pInfo->pResult = hb_gt_qtc_itemPutQString( pInfo->pResult, pQTC->wndTitle );
if( pInfo->pNewVal && HB_IS_STRING( pInfo->pNewVal ) )
if( pInfo->pNewVal )
{
hb_gt_qtc_itemGetQString( pInfo->pNewVal, pQTC->wndTitle );
if( pQTC->qWnd )
pQTC->qWnd->setWindowTitle( *pQTC->wndTitle );
if( HB_IS_STRING( pInfo->pNewVal ) )
{
hb_gt_qtc_itemGetQString( pInfo->pNewVal, pQTC->wndTitle );
if( pQTC->qWnd )
pQTC->qWnd->setWindowTitle( *pQTC->wndTitle );
}
else if( HB_IS_LOGICAL( pInfo->pNewVal ) )
{
pQTC->fNoFrame = hb_itemGetL( pInfo->pNewVal );
if( pQTC->qWnd )
{
Qt::WindowFlags flags = Qt::CustomizeWindowHint;
if( pQTC->fNoFrame )
{
hb_gt_qtc_setWindowFlags( pQTC, /*Qt::WindowTitleHint |
Qt::WindowSystemMenuHint |*/
Qt::WindowMinimizeButtonHint |
Qt::WindowMaximizeButtonHint |
Qt::WindowCloseButtonHint, HB_FALSE );
flags |= Qt::FramelessWindowHint;
}
else
{
if( pQTC->iCloseMode < 2 )
flags |= Qt::WindowCloseButtonHint;
if( pQTC->fResizable )
flags |= Qt::WindowMaximizeButtonHint;
flags |= Qt::WindowMinimizeButtonHint;
}
hb_gt_qtc_setWindowFlags( pQTC, flags, pQTC->fNoFrame );
}
}
}
break;
@@ -3823,14 +3853,21 @@ QTCWindow::QTCWindow( PHB_GTQTC pQTC )
{
Qt::WindowFlags flags = ( windowFlags() & Qt::WindowType_Mask ) |
Qt::CustomizeWindowHint |
Qt::WindowMinimizeButtonHint |
Qt::WindowSystemMenuHint |
Qt::WindowTitleHint |
Qt::Window;
if( pQTC->iCloseMode < 2 )
flags |= Qt::WindowCloseButtonHint;
if( pQTC->fResizable )
flags |= Qt::WindowMaximizeButtonHint;
if( pQTC->fNoFrame )
{
flags |= Qt::FramelessWindowHint;
}
else
{
if( pQTC->iCloseMode < 2 )
flags |= Qt::WindowCloseButtonHint;
if( pQTC->fResizable )
flags |= Qt::WindowMaximizeButtonHint;
flags |= Qt::WindowMinimizeButtonHint |
Qt::WindowSystemMenuHint |
Qt::WindowTitleHint;
}
setWindowFlags( flags );