mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-08 01:26:04 -05:00
Improve preview frame visibilty of cursor condition
* Add transparent diagonal stripes to frame * Do not show frame if invalid selection was made
This commit is contained in:
@@ -334,18 +334,20 @@ void MacroConditionCursorEdit::SetupFrame()
|
||||
Qt::WindowStaysOnTopHint);
|
||||
_frame.setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
|
||||
if (_entryData) {
|
||||
QRect rect(_entryData->_minX, _entryData->_minY,
|
||||
_entryData->_maxX - _entryData->_minX,
|
||||
_entryData->_maxY - _entryData->_minY);
|
||||
|
||||
if (rect.size().height() == 0 || rect.size().width() == 0) {
|
||||
_frame.setGeometry(0, 0, 1, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
_frame.setGeometry(getScreenUnionRect().intersected(rect));
|
||||
if (!_entryData) {
|
||||
return;
|
||||
}
|
||||
|
||||
QRect rect(_entryData->_minX, _entryData->_minY,
|
||||
_entryData->_maxX - _entryData->_minX,
|
||||
_entryData->_maxY - _entryData->_minY);
|
||||
|
||||
if (rect.size().height() <= 0 || rect.size().width() <= 0) {
|
||||
_frame.setGeometry(0, 0, 1, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
_frame.setGeometry(getScreenUnionRect().intersected(rect));
|
||||
}
|
||||
|
||||
void MacroConditionCursorEdit::UpdateEntryData()
|
||||
|
||||
Reference in New Issue
Block a user