From 78f8378d95201f600f39b9b9da0923d895ade070 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Fri, 24 Aug 2012 02:15:06 +0000 Subject: [PATCH] 2012-08-23 18:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp ! Fixed: a small visual glich; result of prev commit. --- harbour/contrib/gtwvg/gtwvg.c | 19 +++++++++++++++++-- .../hbqt/qtgui/hbqt_hbqplaintextedit.cpp | 7 +------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index f83887289c..cbfbe5a6f1 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -155,6 +155,8 @@ static void hb_wvt_gtRestGuiState( PHB_GTWVT pWVT, LPRECT rect ); static void hb_wvt_gtLoadGuiData( void ); static void hb_wvt_gtReleaseGuiData( void ); static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT ); +static HB_BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT ); +static HB_BOOL hb_gt_wvt_FitRows( PHB_GTWVT pWVT ); static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ); @@ -704,8 +706,21 @@ static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) static void hb_gt_wvt_TranslateKey( PHB_GTWVT pWVT, int key, int shiftkey, int altkey, int controlkey ) { - int nVirtKey = GetKeyState( VK_MENU ); - + int nVirtKey; +HB_TRACE( HB_TR_ALWAYS, ( "VKKEYS......." ) ); + if( key == K_LEFT || key == K_RIGHT || key == K_UP || key == K_DOWN ) + { + nVirtKey = GetKeyState( VK_LWIN ); + if( nVirtKey & 0x8000 ) + { +HB_TRACE( HB_TR_ALWAYS, ( "VKKEYS" ) ); + pWVT->bResizing = TRUE; + hb_gt_wvt_FitSizeRows( pWVT ); + return; + } + } + + nVirtKey = GetKeyState( VK_MENU ); if( nVirtKey & 0x8000 ) /* alt + key */ { hb_gt_wvt_AddCharToInputQueue( pWVT, altkey ); diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp index a6decda92c..0d00da0f50 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp @@ -2281,11 +2281,6 @@ int HBQPlainTextEdit::hbGetLine( const QTextCursor &crQTextCursor ) void HBQPlainTextEdit::hbSlotCursorPositionChanged() { - if( columnBegins >= 0 ) /* Under selection mode; do nothing */ - { - return; - } - if( m_currentBlockNumber != textCursor().blockNumber() ) { m_currentBlockNumber = textCursor().blockNumber(); @@ -2295,7 +2290,7 @@ void HBQPlainTextEdit::hbSlotCursorPositionChanged() } } - if( styleHightlighter != "none" ) + if( styleHightlighter != "none" && columnBegins == -1 ) { hbBraceHighlight(); }