Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
439
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
32451a7a
Commit
32451a7a
authored
3 years ago
by
François Cartegnie
Committed by
Jean-Baptiste Kempf
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vout: osd widgets: update colors & sizes
parent
c4cc7329
No related branches found
Branches containing commit
No related tags found
1 merge request
!125
vout: osd widgets: update colors & sizes
Pipeline
#97874
passed with stages
Stage:
Stage:
in 41 minutes and 49 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/video_output/video_epg.c
+4
-4
4 additions, 4 deletions
src/video_output/video_epg.c
src/video_output/video_widgets.c
+15
-12
15 additions, 12 deletions
src/video_output/video_widgets.c
with
19 additions
and
16 deletions
src/video_output/video_epg.c
+
4
−
4
View file @
32451a7a
...
@@ -60,11 +60,11 @@
...
@@ -60,11 +60,11 @@
#define EPGOSD_TEXTSIZE_PROG (OSDEPG_ROWS(2))
#define EPGOSD_TEXTSIZE_PROG (OSDEPG_ROWS(2))
#define EPGOSD_TEXTSIZE_NTWK (OSDEPG_ROWS(2))
#define EPGOSD_TEXTSIZE_NTWK (OSDEPG_ROWS(2))
//
#define RGB_COLOR1 0xf48b00
#define RGB_COLOR1 0xf48b00
//
#define ARGB_BGCOLOR 0xC0333333
#define ARGB_BGCOLOR 0xC0333333
#define RGB_COLOR1 0x2badde
//
#define RGB_COLOR1 0x2badde
#define ARGB_BGCOLOR 0xc003182d
//
#define ARGB_BGCOLOR 0xc003182d
typedef
struct
typedef
struct
{
{
...
...
This diff is collapsed.
Click to expand it.
src/video_output/video_widgets.c
+
15
−
12
View file @
32451a7a
...
@@ -41,11 +41,13 @@
...
@@ -41,11 +41,13 @@
#define STYLE_FILLED 1
#define STYLE_FILLED 1
#define RGB_BLUE 0x2badde
#define RGB_BLUE 0x2badde
#define RGB_ORANGE 0xf48b00
#define RGB_FILL RGB_ORANGE
#define COL_TRANSPARENT 0
#define COL_TRANSPARENT 0
#define COL_WHITE 1
#define COL_WHITE 1
#define COL_
BLUE
2
#define COL_
FILL
2
#define COL_
BLUE
_SHADE 3
#define COL_
FILL
_SHADE 3
#define SET_PALETTE_COLOR(id, rgb, alpha) \
#define SET_PALETTE_COLOR(id, rgb, alpha) \
{\
{\
...
@@ -120,8 +122,8 @@ static subpicture_region_t *OSDRegion(int x, int y, int width, int height)
...
@@ -120,8 +122,8 @@ static subpicture_region_t *OSDRegion(int x, int y, int width, int height)
video_palette_t
palette
;
video_palette_t
palette
;
SET_PALETTE_COLOR
(
COL_WHITE
,
0xffffff
,
STYLE_ALPHA_OPAQUE
)
SET_PALETTE_COLOR
(
COL_WHITE
,
0xffffff
,
STYLE_ALPHA_OPAQUE
)
SET_PALETTE_COLOR
(
COL_TRANSPARENT
,
0xffffff
,
STYLE_ALPHA_TRANSPARENT
)
SET_PALETTE_COLOR
(
COL_TRANSPARENT
,
0xffffff
,
STYLE_ALPHA_TRANSPARENT
)
SET_PALETTE_COLOR
(
COL_
BLUE
,
RGB_
BLUE
,
STYLE_ALPHA_OPAQUE
)
SET_PALETTE_COLOR
(
COL_
FILL
,
RGB_
FILL
,
0xA0
)
SET_PALETTE_COLOR
(
COL_
BLUE
_SHADE
,
RGB_
BLUE
,
0x
40
)
SET_PALETTE_COLOR
(
COL_
FILL
_SHADE
,
RGB_
FILL
,
0x
25
)
palette
.
i_entries
=
4
;
palette
.
i_entries
=
4
;
video_format_t
fmt
;
video_format_t
fmt
;
...
@@ -153,20 +155,21 @@ static subpicture_region_t *OSDSlider(int type, int position,
...
@@ -153,20 +155,21 @@ static subpicture_region_t *OSDSlider(int type, int position,
{
{
const
int
size
=
__MAX
(
fmt
->
i_visible_width
,
fmt
->
i_visible_height
);
const
int
size
=
__MAX
(
fmt
->
i_visible_width
,
fmt
->
i_visible_height
);
const
int
margin
=
size
*
SLIDER_MARGIN_BASE
;
const
int
margin
=
size
*
SLIDER_MARGIN_BASE
;
const
int
marginbottom
=
size
*
SLIDER_MARGIN_BASE
*
0
.
6
;
const
int
marginbottom
=
margin
*
0
.
2
;
uint8_t
i_padding
=
__MIN
(
5
,
size
*
0
.
25
);
/* small sizes */
const
int
marginright
=
margin
*
0
.
5
;
uint8_t
i_padding
=
__MIN
(
1
,
size
*
0
.
25
);
/* small sizes */
int
x
,
y
;
int
x
,
y
;
int
width
,
height
;
int
width
,
height
;
if
(
type
==
OSD_HOR_SLIDER
)
{
if
(
type
==
OSD_HOR_SLIDER
)
{
width
=
__MAX
(
fmt
->
i_visible_width
-
2
*
margin
,
1
);
width
=
__MAX
(
fmt
->
i_visible_width
-
2
*
margin
,
1
);
height
=
__MAX
(
fmt
->
i_visible_height
*
0
.
0
5
,
1
);
height
=
__MAX
(
fmt
->
i_visible_height
*
0
.
0
1
,
1
);
x
=
__MIN
(
fmt
->
i_x_offset
+
margin
,
fmt
->
i_visible_width
-
width
);
x
=
__MIN
(
fmt
->
i_x_offset
+
margin
,
fmt
->
i_visible_width
-
width
);
y
=
__MAX
(
fmt
->
i_y_offset
+
fmt
->
i_visible_height
-
marginbottom
,
0
);
y
=
__MAX
(
fmt
->
i_y_offset
+
fmt
->
i_visible_height
-
marginbottom
,
0
);
}
else
{
}
else
{
width
=
__MAX
(
fmt
->
i_visible_width
*
0
.
0
25
,
1
);
width
=
__MAX
(
fmt
->
i_visible_width
*
0
.
0
10
,
1
);
height
=
__MAX
(
fmt
->
i_visible_height
-
2
*
margin
,
1
);
height
=
__MAX
(
fmt
->
i_visible_height
-
2
*
margin
,
1
);
x
=
__MAX
(
fmt
->
i_x_offset
+
fmt
->
i_visible_width
-
margin
,
0
);
x
=
__MAX
(
fmt
->
i_x_offset
+
fmt
->
i_visible_width
-
margin
right
,
0
);
y
=
__MIN
(
fmt
->
i_y_offset
+
margin
,
fmt
->
i_visible_height
-
height
);
y
=
__MIN
(
fmt
->
i_y_offset
+
margin
,
fmt
->
i_visible_height
-
height
);
}
}
...
@@ -190,8 +193,8 @@ static subpicture_region_t *OSDSlider(int type, int position,
...
@@ -190,8 +193,8 @@ static subpicture_region_t *OSDSlider(int type, int position,
}
}
/* one full fill is faster than drawing outline */
/* one full fill is faster than drawing outline */
DrawRect
(
r
,
STYLE_FILLED
,
COL_
BLUE
_SHADE
,
0
,
0
,
width
-
1
,
height
-
1
);
DrawRect
(
r
,
STYLE_FILLED
,
COL_
FILL
_SHADE
,
0
,
0
,
width
-
1
,
height
-
1
);
DrawRect
(
r
,
STYLE_FILLED
,
COL_
BLUE
,
pos_x
,
pos_y
,
pos_xend
,
pos_yend
);
DrawRect
(
r
,
STYLE_FILLED
,
COL_
FILL
,
pos_x
,
pos_y
,
pos_xend
,
pos_yend
);
return
r
;
return
r
;
}
}
...
@@ -239,7 +242,7 @@ static subpicture_region_t *OSDIcon(int type, const video_format_t *fmt)
...
@@ -239,7 +242,7 @@ static subpicture_region_t *OSDIcon(int type, const video_format_t *fmt)
DrawTriangle
(
r
,
STYLE_FILLED
,
COL_WHITE
,
width
-
delta
,
0
,
delta
,
y2
);
DrawTriangle
(
r
,
STYLE_FILLED
,
COL_WHITE
,
width
-
delta
,
0
,
delta
,
y2
);
if
(
type
==
OSD_MUTE_ICON
)
{
if
(
type
==
OSD_MUTE_ICON
)
{
for
(
int
y1
=
0
;
y1
<=
height
-
1
;
y1
++
)
for
(
int
y1
=
0
;
y1
<=
height
-
1
;
y1
++
)
DrawRect
(
r
,
STYLE_FILLED
,
COL_
BLUE
,
y1
,
y1
,
__MIN
(
y1
+
delta
,
width
-
1
),
y1
);
DrawRect
(
r
,
STYLE_FILLED
,
COL_
FILL
,
y1
,
y1
,
__MIN
(
y1
+
delta
,
width
-
1
),
y1
);
}
}
}
}
return
r
;
return
r
;
...
...
This diff is collapsed.
Click to expand it.
Steve Lhomme
@robUx4
mentioned in merge request
!513 (closed)
·
3 years ago
mentioned in merge request
!513 (closed)
mentioned in merge request !513
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment