Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
dsview
Commits
6f630248
Commit
6f630248
authored
6 years ago
by
DreamSourceLab
Browse files
Options
Download
Email Patches
Plain Diff
Add more clear border of main window
parent
a1c3e07f
Changes
5
Show 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
);
...
...
This diff is collapsed.
Click to expand it.
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
...
...
This diff is collapsed.
Click to expand it.
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
,
...
...
This diff is collapsed.
Click to expand it.
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
,
QC
olor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.25
,
QC
olor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.5
,
QC
olor
(
48
,
47
,
47
,
255
)
);
linearGrad
.
setColorAt
(
0.75
,
QC
olor
(
48
,
47
,
47
,
100
)
);
linearGrad
.
setColorAt
(
1
,
QC
olor
(
48
,
47
,
47
,
10
)
);
linearGrad
.
setColorAt
(
0
,
c
olor
_border0
);
linearGrad
.
setColorAt
(
0.25
,
c
olor
_border1
);
linearGrad
.
setColorAt
(
0.5
,
c
olor
_border2
);
linearGrad
.
setColorAt
(
0.75
,
c
olor
_border3
);
linearGrad
.
setColorAt
(
1
,
c
olor
_border4
);
QRadialGradient
radialGrad
(
QPointF
(
0
,
0
),
width
());
radialGrad
.
setColorAt
(
0
,
QC
olor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.25
,
QC
olor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.5
,
QC
olor
(
48
,
47
,
47
,
255
)
);
radialGrad
.
setColorAt
(
0.75
,
QC
olor
(
48
,
47
,
47
,
100
)
);
radialGrad
.
setColorAt
(
1
,
QC
olor
(
48
,
47
,
47
,
10
)
);
radialGrad
.
setColorAt
(
0
,
c
olor
_border0
);
radialGrad
.
setColorAt
(
0.25
,
c
olor
_border1
);
radialGrad
.
setColorAt
(
0.5
,
c
olor
_border2
);
radialGrad
.
setColorAt
(
0.75
,
c
olor
_border3
);
radialGrad
.
setColorAt
(
1
,
c
olor
_border4
);
if
(
_type
==
pv
::
MainFrame
::
TopLeft
)
{
QRectF
rectangle
(
0
,
0
,
width
()
*
2
,
height
()
*
2
);
...
...
This diff is collapsed.
Click to expand it.
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
);
...
...
This diff is collapsed.
Click to expand it.
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