@@ -2027,7 +2027,8 @@ void Clock::countdownNoticeDialogShow()
2027
2027
if (model_setup->index (0 , 3 ).data ().toInt ()) {
2028
2028
countdownNoticeDialog->showFullScreen ();
2029
2029
} else {
2030
- countdownNoticeDialog->move (screen_width-350 ,screen_height-150 );
2030
+ moveUnderMultiScreen (SP_RIGHT);
2031
+ // countdownNoticeDialog->move(screen_width-350,screen_height-150);
2031
2032
}
2032
2033
countdownNoticeDialog->music ->setVolume (model_setup->index (0 , 6 ).data ().toInt ());
2033
2034
countdownNoticeDialog->timer ->start ();
@@ -3027,6 +3028,34 @@ void Clock::showPaint8()
3027
3028
}
3028
3029
}
3029
3030
3031
+ void Clock::moveUnderMultiScreen (Clock::ScreenPosition spostion)
3032
+ {
3033
+ QScreen *screen=QGuiApplication::primaryScreen ();
3034
+ int screen_width = screen->geometry ().width ();
3035
+ int screen_height = screen->geometry ().height ();
3036
+ switch (spostion) {
3037
+ case SP_LEFT:
3038
+ {
3039
+ QPoint po = this ->geometry ().bottomLeft ();
3040
+ countdownNoticeDialog->move (po.x (),po.y ());
3041
+ }break ;
3042
+ case SP_RIGHT:
3043
+ {
3044
+
3045
+ QPoint po = this ->geometry ().bottomRight ();
3046
+ // 略微调整下右下角
3047
+ countdownNoticeDialog->move (po.x ()+screen_width/4 ,po.y ());
3048
+ }break ;
3049
+ case SP_CENTER:
3050
+ {
3051
+ QPoint po = this ->geometry ().center ();
3052
+ countdownNoticeDialog->move (po);
3053
+ }break ;
3054
+ default :
3055
+ {}
3056
+ }
3057
+ }
3058
+
3030
3059
/* 窗口拖动事件,
3031
3060
*添加原因为:通用窗口拖动事件导致窗口周边大约8像素左右无法拖动。
3032
3061
*注释原因为:非系统窗口拖动事件会导致在4K屏幕下,拖动光标偏移现象。
0 commit comments