mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Saner choice for the frameless window type; no more window activating which
used to unnecessarily steal focus.
This commit is contained in:
parent
f31693dac9
commit
89c2e3318d
|
@ -28,8 +28,7 @@ ScanPopup::ScanPopup( QWidget * parent,
|
||||||
ui.prefixButton->hide();
|
ui.prefixButton->hide();
|
||||||
|
|
||||||
ui.groupList->fill( groups );
|
ui.groupList->fill( groups );
|
||||||
//setWindowFlags( Qt::Tool );
|
setWindowFlags( Qt::Popup );
|
||||||
setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::Tool );
|
|
||||||
|
|
||||||
#if 0 // Experimental code to give window a non-rectangular shape (i.e.
|
#if 0 // Experimental code to give window a non-rectangular shape (i.e.
|
||||||
// balloon) using a colorkey mask.
|
// balloon) using a colorkey mask.
|
||||||
|
@ -88,7 +87,6 @@ void ScanPopup::clipboardChanged( QClipboard::Mode m )
|
||||||
move( currentPos.x() + 4, currentPos.y() + 10 );
|
move( currentPos.x() + 4, currentPos.y() + 10 );
|
||||||
|
|
||||||
show();
|
show();
|
||||||
activateWindow();
|
|
||||||
|
|
||||||
QApplication::processEvents(); // Make window appear immediately no matter what
|
QApplication::processEvents(); // Make window appear immediately no matter what
|
||||||
}
|
}
|
||||||
|
@ -221,7 +219,7 @@ void ScanPopup::pinButtonClicked( bool checked )
|
||||||
if ( checked )
|
if ( checked )
|
||||||
setWindowFlags( Qt::Dialog );
|
setWindowFlags( Qt::Dialog );
|
||||||
else
|
else
|
||||||
setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::Tool );
|
setWindowFlags( Qt::Popup );
|
||||||
|
|
||||||
// Should we disable grip? I like it with the grip better.
|
// Should we disable grip? I like it with the grip better.
|
||||||
//ui.gripArea->setDisabled( checked );
|
//ui.gripArea->setDisabled( checked );
|
||||||
|
|
Loading…
Reference in a new issue