All of lore.kernel.org
 help / color / mirror / Atom feed
* [psplash][PATCH 1/2] Add configure flags to set progression bar size
@ 2025-11-20 21:03 Gaël PORTAY
  2025-11-20 21:03 ` [psplash][PATCH 2/2] Add configure flags to set colors Gaël PORTAY
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gaël PORTAY @ 2025-11-20 21:03 UTC (permalink / raw)
  To: yocto-patches; +Cc: Gaël PORTAY

Added --progress-bar-border-size configure option to set progress bar
border size without patching the code. Default behaviour is to show a
progress bar with a 4-pixel border size.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 configure.ac     |  8 ++++++++
 psplash-config.h |  5 +++++
 psplash.c        | 10 +++++-----
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 110ce32..a64990a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,14 @@ AS_IF([test "x$enable_progress_bar" = "xno"], [
     EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_PROGRESS_BAR"
 ])
 
+AC_ARG_WITH([progress-bar-border-size],
+    AS_HELP_STRING([--with-progress-bar-border-size=SIZE], [Set progress bar border size (default is 4 pixel)]),
+    [with_progress_bar_border_size=$withval],
+    [with_progress_bar_border_size=4])
+AS_IF([test "x$with_progress_bar_border_size" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_PROGRESS_BAR_BORDER_SIZE=$with_progress_bar_border_size"
+])
+
 AC_ARG_ENABLE([img-fullscreen],
     AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
     [enable_img_fullscreen=$enableval],
diff --git a/psplash-config.h b/psplash-config.h
index eb90ef3..c7fff81 100644
--- a/psplash-config.h
+++ b/psplash-config.h
@@ -26,6 +26,11 @@
 #define PSPLASH_SHOW_PROGRESS_BAR 1
 #endif
 
+/* Size of the progress bar */
+#ifndef PSPLASH_PROGRESS_BAR_BORDER_SIZE
+#define PSPLASH_PROGRESS_BAR_BORDER_SIZE 4
+#endif
+
 /* Position of the image split from top edge, numerator of fraction */
 #define PSPLASH_IMG_SPLIT_NUMERATOR 5
 
diff --git a/psplash.c b/psplash.c
index 261dd1c..fbd51d0 100644
--- a/psplash.c
+++ b/psplash.c
@@ -67,11 +67,11 @@ psplash_draw_progress (PSplashFB *fb, int value)
 {
   int x, y, width, height, barwidth;
 
-  /* 4 pix border */
-  x      = ((fb->width  - BAR_IMG_WIDTH)/2) + 4 ;
-  y      = SPLIT_LINE_POS(fb) + 4;
-  width  = BAR_IMG_WIDTH - 8; 
-  height = BAR_IMG_HEIGHT - 8;
+  /* n pix border */
+  x      = ((fb->width  - BAR_IMG_WIDTH)/2) + PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  y      = SPLIT_LINE_POS(fb) + PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  width  = BAR_IMG_WIDTH - 2 * PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  height = BAR_IMG_HEIGHT - 2 * PSPLASH_PROGRESS_BAR_BORDER_SIZE;
 
   if (value > 0)
     {
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [psplash][PATCH 2/2] Add configure flags to set colors
  2025-11-20 21:03 [psplash][PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
@ 2025-11-20 21:03 ` Gaël PORTAY
  2025-11-20 21:03 ` [PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gaël PORTAY @ 2025-11-20 21:03 UTC (permalink / raw)
  To: yocto-patches; +Cc: Gaël PORTAY

Added --with-text-color, --with-background-color, --with-bar-color, and
--with-bar-background-color configure options to set colors without
patching the code. Default colors are 0x6d,0x6d,0x70 for any text output
and bar indicator, and 0xec,0xec,0xe1 for overall background.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 configure.ac     | 32 ++++++++++++++++++++++++++++++++
 psplash-colors.h |  8 ++++++++
 2 files changed, 40 insertions(+)

diff --git a/configure.ac b/configure.ac
index a64990a..d01afce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,38 @@ AS_IF([test "x$with_progress_bar_border_size" != "xyes"], [
     EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_PROGRESS_BAR_BORDER_SIZE=$with_progress_bar_border_size"
 ])
 
+AC_ARG_WITH([text-color],
+    AS_HELP_STRING([--with-text-color=RED,GREEN,BLUE], [Set color of any text output (default is 0x6d,0x6d,0x70)]),
+    [with_text_color=$withval],
+    [with_text_color=0x6d,0x6d,0x70])
+AS_IF([test "x$with_text_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_TEXT_COLOR=$with_text_color"
+])
+
+AC_ARG_WITH([background-color],
+    AS_HELP_STRING([--with-background-color=RED,GREEN,BLUE], [Set color of overall background (default is 0xec,0xec,0xe1)]),
+    [with_background_color=$withval],
+    [with_background_color=0xec,0xec,0xe1])
+AS_IF([test "x$with_background_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BACKGROUND_COLOR=$with_background_color"
+])
+
+AC_ARG_WITH([bar-color],
+    AS_HELP_STRING([--with-bar-color=RED,GREEN,BLUE], [Set color of the progress bar indicator (default is 0x6d,0x6d,0x70)]),
+    [with_bar_color=$withval],
+    [with_bar_color=0x6d,0x6d,0x70])
+AS_IF([test "x$with_bar_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_COLOR=$with_bar_color"
+])
+
+AC_ARG_WITH([bar-background-color],
+    AS_HELP_STRING([--with-bar-background-color=RED,GREEN,BLUE], [Set color of the progress bar background (default is 0xec,0xec,0xe1)]),
+    [with_bar_background_color=$withval],
+    [with_bar_background_color=0xec,0xec,0xe1])
+AS_IF([test "x$with_bar_background_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_BACKGROUND_COLOR=$with_bar_background_color"
+])
+
 AC_ARG_ENABLE([img-fullscreen],
     AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
     [enable_img_fullscreen=$enableval],
diff --git a/psplash-colors.h b/psplash-colors.h
index 82a9893..d6d19af 100644
--- a/psplash-colors.h
+++ b/psplash-colors.h
@@ -12,15 +12,23 @@
 #define _HAVE_PSPLASH_COLORS_H
 
 /* This is the overall background color */
+#ifndef PSPLASH_BACKGROUND_COLOR
 #define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
+#endif
 
 /* This is the color of any text output */
+#ifndef PSPLASH_TEXT_COLOR
 #define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
+#endif
 
 /* This is the color of the progress bar indicator */
+#ifdef PSPLASH_BAR_COLOR
 #define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
+#endif
 
 /* This is the color of the progress bar background */
+#ifdef PSPLASH_BAR_BACKGROUND_COLOR
 #define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
+#endif
 
 #endif
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 1/2] Add configure flags to set progression bar size
  2025-11-20 21:03 [psplash][PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
  2025-11-20 21:03 ` [psplash][PATCH 2/2] Add configure flags to set colors Gaël PORTAY
@ 2025-11-20 21:03 ` Gaël PORTAY
  2025-11-20 21:03 ` [PATCH 2/2] Add configure flags to set colors Gaël PORTAY
       [not found] ` <1879D2EAB5EE21E5.1334697@lists.yoctoproject.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Gaël PORTAY @ 2025-11-20 21:03 UTC (permalink / raw)
  To: yocto-patches; +Cc: Gaël PORTAY

Added --progress-bar-border-size configure option to set progress bar
border size without patching the code. Default behaviour is to show a
progress bar with a 4-pixel border size.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 configure.ac     |  8 ++++++++
 psplash-config.h |  5 +++++
 psplash.c        | 10 +++++-----
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 110ce32..a64990a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,14 @@ AS_IF([test "x$enable_progress_bar" = "xno"], [
     EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_PROGRESS_BAR"
 ])
 
+AC_ARG_WITH([progress-bar-border-size],
+    AS_HELP_STRING([--with-progress-bar-border-size=SIZE], [Set progress bar border size (default is 4 pixel)]),
+    [with_progress_bar_border_size=$withval],
+    [with_progress_bar_border_size=4])
+AS_IF([test "x$with_progress_bar_border_size" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_PROGRESS_BAR_BORDER_SIZE=$with_progress_bar_border_size"
+])
+
 AC_ARG_ENABLE([img-fullscreen],
     AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
     [enable_img_fullscreen=$enableval],
diff --git a/psplash-config.h b/psplash-config.h
index eb90ef3..c7fff81 100644
--- a/psplash-config.h
+++ b/psplash-config.h
@@ -26,6 +26,11 @@
 #define PSPLASH_SHOW_PROGRESS_BAR 1
 #endif
 
+/* Size of the progress bar */
+#ifndef PSPLASH_PROGRESS_BAR_BORDER_SIZE
+#define PSPLASH_PROGRESS_BAR_BORDER_SIZE 4
+#endif
+
 /* Position of the image split from top edge, numerator of fraction */
 #define PSPLASH_IMG_SPLIT_NUMERATOR 5
 
diff --git a/psplash.c b/psplash.c
index 261dd1c..fbd51d0 100644
--- a/psplash.c
+++ b/psplash.c
@@ -67,11 +67,11 @@ psplash_draw_progress (PSplashFB *fb, int value)
 {
   int x, y, width, height, barwidth;
 
-  /* 4 pix border */
-  x      = ((fb->width  - BAR_IMG_WIDTH)/2) + 4 ;
-  y      = SPLIT_LINE_POS(fb) + 4;
-  width  = BAR_IMG_WIDTH - 8; 
-  height = BAR_IMG_HEIGHT - 8;
+  /* n pix border */
+  x      = ((fb->width  - BAR_IMG_WIDTH)/2) + PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  y      = SPLIT_LINE_POS(fb) + PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  width  = BAR_IMG_WIDTH - 2 * PSPLASH_PROGRESS_BAR_BORDER_SIZE;
+  height = BAR_IMG_HEIGHT - 2 * PSPLASH_PROGRESS_BAR_BORDER_SIZE;
 
   if (value > 0)
     {
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] Add configure flags to set colors
  2025-11-20 21:03 [psplash][PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
  2025-11-20 21:03 ` [psplash][PATCH 2/2] Add configure flags to set colors Gaël PORTAY
  2025-11-20 21:03 ` [PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
@ 2025-11-20 21:03 ` Gaël PORTAY
       [not found] ` <1879D2EAB5EE21E5.1334697@lists.yoctoproject.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Gaël PORTAY @ 2025-11-20 21:03 UTC (permalink / raw)
  To: yocto-patches; +Cc: Gaël PORTAY

Added --with-text-color, --with-background-color, --with-bar-color, and
--with-bar-background-color configure options to set colors without
patching the code. Default colors are 0x6d,0x6d,0x70 for any text output
and bar indicator, and 0xec,0xec,0xe1 for overall background.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 configure.ac     | 32 ++++++++++++++++++++++++++++++++
 psplash-colors.h |  8 ++++++++
 2 files changed, 40 insertions(+)

diff --git a/configure.ac b/configure.ac
index a64990a..d01afce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,38 @@ AS_IF([test "x$with_progress_bar_border_size" != "xyes"], [
     EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_PROGRESS_BAR_BORDER_SIZE=$with_progress_bar_border_size"
 ])
 
+AC_ARG_WITH([text-color],
+    AS_HELP_STRING([--with-text-color=RED,GREEN,BLUE], [Set color of any text output (default is 0x6d,0x6d,0x70)]),
+    [with_text_color=$withval],
+    [with_text_color=0x6d,0x6d,0x70])
+AS_IF([test "x$with_text_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_TEXT_COLOR=$with_text_color"
+])
+
+AC_ARG_WITH([background-color],
+    AS_HELP_STRING([--with-background-color=RED,GREEN,BLUE], [Set color of overall background (default is 0xec,0xec,0xe1)]),
+    [with_background_color=$withval],
+    [with_background_color=0xec,0xec,0xe1])
+AS_IF([test "x$with_background_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BACKGROUND_COLOR=$with_background_color"
+])
+
+AC_ARG_WITH([bar-color],
+    AS_HELP_STRING([--with-bar-color=RED,GREEN,BLUE], [Set color of the progress bar indicator (default is 0x6d,0x6d,0x70)]),
+    [with_bar_color=$withval],
+    [with_bar_color=0x6d,0x6d,0x70])
+AS_IF([test "x$with_bar_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_COLOR=$with_bar_color"
+])
+
+AC_ARG_WITH([bar-background-color],
+    AS_HELP_STRING([--with-bar-background-color=RED,GREEN,BLUE], [Set color of the progress bar background (default is 0xec,0xec,0xe1)]),
+    [with_bar_background_color=$withval],
+    [with_bar_background_color=0xec,0xec,0xe1])
+AS_IF([test "x$with_bar_background_color" != "xyes"], [
+    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_BACKGROUND_COLOR=$with_bar_background_color"
+])
+
 AC_ARG_ENABLE([img-fullscreen],
     AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
     [enable_img_fullscreen=$enableval],
diff --git a/psplash-colors.h b/psplash-colors.h
index 82a9893..d6d19af 100644
--- a/psplash-colors.h
+++ b/psplash-colors.h
@@ -12,15 +12,23 @@
 #define _HAVE_PSPLASH_COLORS_H
 
 /* This is the overall background color */
+#ifndef PSPLASH_BACKGROUND_COLOR
 #define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
+#endif
 
 /* This is the color of any text output */
+#ifndef PSPLASH_TEXT_COLOR
 #define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
+#endif
 
 /* This is the color of the progress bar indicator */
+#ifdef PSPLASH_BAR_COLOR
 #define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
+#endif
 
 /* This is the color of the progress bar background */
+#ifdef PSPLASH_BAR_BACKGROUND_COLOR
 #define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
+#endif
 
 #endif
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [yocto-patches] [psplash][PATCH 2/2] Add configure flags to set colors
       [not found] ` <1879D2EAB5EE21E5.1334697@lists.yoctoproject.org>
@ 2026-10-25  7:22   ` Gaël PORTAY
  0 siblings, 0 replies; 5+ messages in thread
From: Gaël PORTAY @ 2026-10-25  7:22 UTC (permalink / raw)
  To: yocto-patches; +Cc: Gaël PORTAY

Dear Maintainers,

I am just bumping this for visibility, I am sorry if this is not
appropriate.

Kind Regards,
Gaël

On Thu Nov 20, 2025 at 10:03 PM CET, Gaël PORTAY via lists.yoctoproject.org wrote:
> Added --with-text-color, --with-background-color, --with-bar-color, and
> --with-bar-background-color configure options to set colors without
> patching the code. Default colors are 0x6d,0x6d,0x70 for any text output
> and bar indicator, and 0xec,0xec,0xe1 for overall background.
>
> Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
> ---
>  configure.ac     | 32 ++++++++++++++++++++++++++++++++
>  psplash-colors.h |  8 ++++++++
>  2 files changed, 40 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index a64990a..d01afce 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -53,6 +53,38 @@ AS_IF([test "x$with_progress_bar_border_size" != "xyes"], [
>      EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_PROGRESS_BAR_BORDER_SIZE=$with_progress_bar_border_size"
>  ])
>  
> +AC_ARG_WITH([text-color],
> +    AS_HELP_STRING([--with-text-color=RED,GREEN,BLUE], [Set color of any text output (default is 0x6d,0x6d,0x70)]),
> +    [with_text_color=$withval],
> +    [with_text_color=0x6d,0x6d,0x70])
> +AS_IF([test "x$with_text_color" != "xyes"], [
> +    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_TEXT_COLOR=$with_text_color"
> +])
> +
> +AC_ARG_WITH([background-color],
> +    AS_HELP_STRING([--with-background-color=RED,GREEN,BLUE], [Set color of overall background (default is 0xec,0xec,0xe1)]),
> +    [with_background_color=$withval],
> +    [with_background_color=0xec,0xec,0xe1])
> +AS_IF([test "x$with_background_color" != "xyes"], [
> +    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BACKGROUND_COLOR=$with_background_color"
> +])
> +
> +AC_ARG_WITH([bar-color],
> +    AS_HELP_STRING([--with-bar-color=RED,GREEN,BLUE], [Set color of the progress bar indicator (default is 0x6d,0x6d,0x70)]),
> +    [with_bar_color=$withval],
> +    [with_bar_color=0x6d,0x6d,0x70])
> +AS_IF([test "x$with_bar_color" != "xyes"], [
> +    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_COLOR=$with_bar_color"
> +])
> +
> +AC_ARG_WITH([bar-background-color],
> +    AS_HELP_STRING([--with-bar-background-color=RED,GREEN,BLUE], [Set color of the progress bar background (default is 0xec,0xec,0xe1)]),
> +    [with_bar_background_color=$withval],
> +    [with_bar_background_color=0xec,0xec,0xe1])
> +AS_IF([test "x$with_bar_background_color" != "xyes"], [
> +    EXTRA_GCC_FLAGS="$EXTRA_GCC_FLAGS -DPSPLASH_BAR_BACKGROUND_COLOR=$with_bar_background_color"
> +])
> +
>  AC_ARG_ENABLE([img-fullscreen],
>      AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in fullscreen mode)]),
>      [enable_img_fullscreen=$enableval],
> diff --git a/psplash-colors.h b/psplash-colors.h
> index 82a9893..d6d19af 100644
> --- a/psplash-colors.h
> +++ b/psplash-colors.h
> @@ -12,15 +12,23 @@
>  #define _HAVE_PSPLASH_COLORS_H
>  
>  /* This is the overall background color */
> +#ifndef PSPLASH_BACKGROUND_COLOR
>  #define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
> +#endif
>  
>  /* This is the color of any text output */
> +#ifndef PSPLASH_TEXT_COLOR
>  #define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
> +#endif
>  
>  /* This is the color of the progress bar indicator */
> +#ifdef PSPLASH_BAR_COLOR
>  #define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
> +#endif
>  
>  /* This is the color of the progress bar background */
> +#ifdef PSPLASH_BAR_BACKGROUND_COLOR
>  #define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
> +#endif
>  
>  #endif


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-25  7:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 21:03 [psplash][PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
2025-11-20 21:03 ` [psplash][PATCH 2/2] Add configure flags to set colors Gaël PORTAY
2025-11-20 21:03 ` [PATCH 1/2] Add configure flags to set progression bar size Gaël PORTAY
2025-11-20 21:03 ` [PATCH 2/2] Add configure flags to set colors Gaël PORTAY
     [not found] ` <1879D2EAB5EE21E5.1334697@lists.yoctoproject.org>
2026-10-25  7:22   ` [yocto-patches] [psplash][PATCH " Gaël PORTAY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.