Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raptor Engineering Public Development
dsview
Commits
6f630248
Commit
6f630248
authored
May 25, 2018
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more clear border of main window
parent
a1c3e07f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
14 deletions
+27
-14
DSView/main.cpp
DSView/main.cpp
+1
-1
DSView/pv/mainframe.cpp
DSView/pv/mainframe.cpp
+2
-2
DSView/pv/mainframe.h
DSView/pv/mainframe.h
+1
-1
DSView/pv/widgets/border.cpp
DSView/pv/widgets/border.cpp
+16
-10
DSView/pv/widgets/border.h
DSView/pv/widgets/border.h
+7
-0
No files found.
DSView/main.cpp
View file @
6f630248
...
...
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
struct
sr_context
*
sr_ctx
=
NULL
;
const
char
*
open_file
=
NULL
;
DS
Application
a
(
argc
,
argv
);
Q
Application
a
(
argc
,
argv
);
// Set some application metadata
QApplication
::
setApplicationVersion
(
DS_VERSION_STRING
);
...
...
DSView/pv/mainframe.cpp
View file @
6f630248
...
...
@@ -47,8 +47,8 @@ MainFrame::MainFrame(DeviceManager &device_manager,
// be resized or moved via the window system
setWindowFlags
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowSystemMenuHint
|
Qt
::
WindowMinimizeButtonHint
|
Qt
::
WindowMaximizeButtonHint
);
setMinimumHeight
(
680
);
setMinimumWidth
(
800
);
setMinimumHeight
(
minHeight
);
setMinimumWidth
(
minWidth
);
//resize(1024, 768);
// Set the window icon
...
...
DSView/pv/mainframe.h
View file @
6f630248
...
...
@@ -46,7 +46,7 @@ public:
static
const
int
minHeight
=
680
;
public:
static
const
int
Margin
=
8
;
static
const
int
Margin
=
5
;
enum
borderTypes
{
None
,
...
...
DSView/pv/widgets/border.cpp
View file @
6f630248
...
...
@@ -29,6 +29,12 @@
namespace
pv
{
namespace
widgets
{
const
QColor
Border
::
color_border0
=
QColor
(
80
,
80
,
80
,
255
);
const
QColor
Border
::
color_border1
=
QColor
(
48
,
47
,
47
,
200
);
const
QColor
Border
::
color_border2
=
QColor
(
48
,
47
,
47
,
150
);
const
QColor
Border
::
color_border3
=
QColor
(
48
,
47
,
47
,
100
);
const
QColor
Border
::
color_border4
=
QColor
(
48
,
47
,
47
,
10
);
Border
::
Border
(
int
type
,
QWidget
*
parent
)
:
QWidget
(
parent
),
_type
(
type
)
...
...
@@ -43,18 +49,18 @@ void Border::paintEvent(QPaintEvent *)
painter
.
setPen
(
Qt
::
NoPen
);
painter
.
setRenderHint
(
QPainter
::
Antialiasing
,
true
);
QLinearGradient
linearGrad
(
QPointF
(
width
(),
height
()),
QPointF
(
0
,
0
));
linearGrad
.
setColorAt
(
0
,
QColor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.25
,
QColor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.5
,
QColor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.75
,
QColor
(
48
,
47
,
47
,
100
)
);
linearGrad
.
setColorAt
(
1
,
QColor
(
48
,
47
,
47
,
10
)
);
linearGrad
.
setColorAt
(
0
,
color_border0
);
linearGrad
.
setColorAt
(
0.25
,
color_border1
);
linearGrad
.
setColorAt
(
0.5
,
color_border2
);
linearGrad
.
setColorAt
(
0.75
,
color_border3
);
linearGrad
.
setColorAt
(
1
,
color_border4
);
QRadialGradient
radialGrad
(
QPointF
(
0
,
0
),
width
());
radialGrad
.
setColorAt
(
0
,
QColor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.25
,
QColor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.5
,
QColor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.75
,
QColor
(
48
,
47
,
47
,
100
)
);
radialGrad
.
setColorAt
(
1
,
QColor
(
48
,
47
,
47
,
10
)
);
radialGrad
.
setColorAt
(
0
,
color_border0
);
radialGrad
.
setColorAt
(
0.25
,
color_border1
);
radialGrad
.
setColorAt
(
0.5
,
color_border2
);
radialGrad
.
setColorAt
(
0.75
,
color_border3
);
radialGrad
.
setColorAt
(
1
,
color_border4
);
if
(
_type
==
pv
::
MainFrame
::
TopLeft
)
{
QRectF
rectangle
(
0
,
0
,
width
()
*
2
,
height
()
*
2
);
...
...
DSView/pv/widgets/border.h
View file @
6f630248
...
...
@@ -30,6 +30,13 @@ namespace widgets {
class
Border
:
public
QWidget
{
Q_OBJECT
private:
static
const
QColor
color_border0
;
static
const
QColor
color_border1
;
static
const
QColor
color_border2
;
static
const
QColor
color_border3
;
static
const
QColor
color_border4
;
public:
explicit
Border
(
int
type
,
QWidget
*
parent
=
0
);
...
...
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