Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
074821a8
Commit
074821a8
authored
Aug 15, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Aug 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Splash.c: make Splash logo work with white background (-wr) mode, too
parent
afebb821
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
22 deletions
+31
-22
Splash.c
nx-X11/programs/Xserver/hw/nxagent/Splash.c
+31
-22
No files found.
nx-X11/programs/Xserver/hw/nxagent/Splash.c
View file @
074821a8
...
...
@@ -58,10 +58,10 @@
* Colors used to paint the splash screen.
*/
#define nxagentLogoWhite 0xffffff
#define nxagentLogo
Red 0xff
0000
#define nxagentLogo
Black 0x000000
#define nxagentLogo
Gray 0x222222
#define nxagentLogoWhite
0xffffff
#define nxagentLogo
Black 0x00
0000
#define nxagentLogo
DarkGray 0x222222
#define nxagentLogo
LightGray 0xbbbbbb
static
void
nxagentPaintLogo
(
Window
win
,
GC
gc
,
int
scale
,
int
width
,
int
height
);
...
...
@@ -183,9 +183,9 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
#ifdef NXAGENT_LOGO_DEBUG
fprintf
(
stderr
,
"%s: begin
\n
"
,
__func__
);
fprintf
(
stderr
,
"%s: gen params are: w=%d h=%d d=%d
r=%x w=%x b=%x
\n
"
,
__func__
,
fprintf
(
stderr
,
"%s: gen params are: w=%d h=%d d=%d
w=%x b=%x g1=%x g2=%x
\n
"
,
__func__
,
width
,
height
,
depth
,
nxagentLogo
Red
,
nxagentLogoWhite
,
nxagentLogoBlack
);
nxagentLogo
White
,
nxagentLogoBlack
,
nxagentLogoDarkGray
,
nxagentLogoLightGray
);
#endif
int
w
=
width
/
scale
;
...
...
@@ -204,43 +204,52 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
c
=
w
/
48
;
}
XPoint
rect
[
4
];
rect
[
0
].
x
=
0
;
rect
[
0
].
y
=
0
;
rect
[
1
].
x
=
0
;
rect
[
1
].
y
=
h
;
rect
[
2
].
x
=
w
;
rect
[
2
].
y
=
h
;
rect
[
3
].
x
=
w
;
rect
[
3
].
y
=
0
;
XSetFunction
(
nxagentDisplay
,
gc
,
GXcopy
);
XSetFillStyle
(
nxagentDisplay
,
gc
,
FillSolid
);
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoBlack
);
XSetBackground
(
nxagentDisplay
,
gc
,
nxagentLogoRed
);
nxagentPixmapLogo
=
XCreatePixmap
(
nxagentDisplay
,
win
,
width
,
height
,
nxagentLogoDepth
);
nxagentPixmapLogo
=
XCreatePixmap
(
nxagentDisplay
,
win
,
width
,
height
,
depth
);
if
(
!
nxagentPixmapLogo
)
{
return
;
}
if
(
blackRoot
)
{
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoBlack
);
XSetBackground
(
nxagentDisplay
,
gc
,
nxagentLogoWhite
);
}
else
{
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoWhite
);
XSetBackground
(
nxagentDisplay
,
gc
,
nxagentLogoBlack
);
}
XPoint
rect
[
4
];
rect
[
0
].
x
=
0
;
rect
[
0
].
y
=
0
;
rect
[
1
].
x
=
0
;
rect
[
1
].
y
=
h
;
rect
[
2
].
x
=
w
;
rect
[
2
].
y
=
h
;
rect
[
3
].
x
=
w
;
rect
[
3
].
y
=
0
;
/* paint background */
XFillPolygon
(
nxagentDisplay
,
nxagentPixmapLogo
,
gc
,
rect
,
4
,
Convex
,
CoordModeOrigin
);
#ifdef NXAGENT_LOGO_DEBUG
fprintf
(
stderr
,
"%s: filled first poly
\n
"
,
__func__
);
#endif
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoRed
);
XSetBackground
(
nxagentDisplay
,
gc
,
nxagentLogoWhite
);
/*
* Draw X2GO Logo
*/
if
(
blackRoot
)
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoDarkGray
);
else
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoLightGray
);
/*
*
Begin
'X'.
*
Start
'X'.
*/
XSetForeground
(
nxagentDisplay
,
gc
,
nxagentLogoGray
);
XSetBackground
(
nxagentDisplay
,
gc
,
nxagentLogoWhite
);
rect
[
0
].
x
=
w2
-
7
*
c
;
rect
[
0
].
y
=
h2
-
5
*
c
;
rect
[
1
].
x
=
w2
-
8
*
c
;
rect
[
1
].
y
=
h2
-
5
*
c
;
rect
[
2
].
x
=
w2
-
4
*
c
;
rect
[
2
].
y
=
h2
+
3
*
c
;
...
...
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