Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_home
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
fmp_home
Commits
ad717311
Commit
ad717311
authored
Jun 26, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 解决窗口保存位置过大时显示到屏幕外问题
parent
06108fca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
fmp_home_navwindow.cpp
+15
-3
version.h
+1
-1
No files found.
fmp_home_navwindow.cpp
View file @
ad717311
...
...
@@ -13,6 +13,7 @@
#include <QSystemTrayIcon>
#include <QMenu>
#include <QtConcurrent>
#include <QDesktopWidget>
NavWindow
::
NavWindow
(
QWidget
*
parent
)
:
QDialog
(
parent
),
...
...
@@ -47,7 +48,20 @@ NavWindow::NavWindow(QWidget *parent) :
initMenu
();
initSystemTrayIcon
();
this
->
move
(
FMPHomeSettings
::
instance
()
->
getWindowPosition
());
QPoint
pos
=
FMPHomeSettings
::
instance
()
->
getWindowPosition
();
//! 防止显示到屏幕外
QDesktopWidget
w
;
QRect
rc
=
w
.
availableGeometry
();
if
(
pos
.
x
()
>
rc
.
width
()
-
width
())
{
pos
.
setX
(
200
);
}
if
(
pos
.
y
()
>
rc
.
height
()
-
height
())
{
pos
.
setY
(
76
);
}
this
->
move
(
pos
);
connect
(
ui
->
navMainBtn
,
SIGNAL
(
moved
(
QPoint
)),
this
,
SLOT
(
onMoved
(
QPoint
)));
connect
(
this
,
SIGNAL
(
navImageChanged
()),
this
,
SLOT
(
onNavImageChanged
()));
...
...
@@ -55,8 +69,6 @@ NavWindow::NavWindow(QWidget *parent) :
NavWindow
::~
NavWindow
()
{
FMP_DEBUG
()
<<
__FUNCTION__
<<
"****"
;
//! 解决闪烁时退出卡死
_semaphore
.
release
(
_blinkObjQueue
.
count
());
_blinkObjQueue
.
clear
();
...
...
version.h
View file @
ad717311
...
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 1
5
#define VER_BUILD 1
7
//! Convert version numbers to string
#define _STR(S) #S
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment