Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/3e90cdf68998642149150e4e2d53a4ec592ded8e
...commit
http://git.netsurf-browser.org/netsurf.git/commit/3e90cdf68998642149150e4e2d53a4ec592ded8e
...tree
http://git.netsurf-browser.org/netsurf.git/tree/3e90cdf68998642149150e4e2d53a4ec592ded8e
The branch, master has been updated
via 3e90cdf68998642149150e4e2d53a4ec592ded8e (commit)
via 994827ab827549cccddbc8eb1b4ecc567d37999f (commit)
via 3626a5654e858ca6915327628e58a09e938392f4 (commit)
from 60f8f0126d49dc5313d44858e9b4da0aeb1f5697 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=3e90cdf68998642149150e4e2d53a4ec592ded8e
commit 3e90cdf68998642149150e4e2d53a4ec592ded8e
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Treeview: Use text input colour style for search bar.
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 3f2054b..8079a1b 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -2050,9 +2050,9 @@ treeview_create(treeview **tree,
if (flags & TREEVIEW_SEARCHABLE) {
(*tree)->search.textarea = treeview__create_textarea(
*tree, 600, tree_g.line_height,
- plot_style_even.text.background,
- plot_style_even.text.background,
- plot_style_even.text.foreground,
+ nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_FG],
plot_style_odd.text,
treeview_textarea_search_callback);
if ((*tree)->search.textarea == NULL) {
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=994827ab827549cccddbc8eb1b4ecc567d37999f
commit 994827ab827549cccddbc8eb1b4ecc567d37999f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
NS colour: Add colour scheme for text inputs.
diff --git a/utils/nscolour.c b/utils/nscolour.c
index e66fbf8..0b36bab 100644
--- a/utils/nscolour.c
+++ b/utils/nscolour.c
@@ -183,6 +183,14 @@ nserror nscolour_update(void)
return res;
}
+ nscolours[NSCOLOUR_TEXT_INPUT_BG] =
+ colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_BG]);
+ nscolours[NSCOLOUR_TEXT_INPUT_FG] =
+ colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_FG]);
+ nscolours[NSCOLOUR_TEXT_INPUT_FG_SUBTLE] =
+ blend_colour(nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_FG]);
+
return NSERROR_OK;
}
diff --git a/utils/nscolour.h b/utils/nscolour.h
index 910d7f7..855a398 100644
--- a/utils/nscolour.h
+++ b/utils/nscolour.h
@@ -47,6 +47,9 @@ enum nscolour {
NSCOLOUR_WIN_EVEN_FG_GOOD,
NSCOLOUR_WIN_EVEN_FG_BAD,
NSCOLOUR_WIN_EVEN_BORDER,
+ NSCOLOUR_TEXT_INPUT_BG,
+ NSCOLOUR_TEXT_INPUT_FG,
+ NSCOLOUR_TEXT_INPUT_FG_SUBTLE,
NSCOLOUR_SEL_BG,
NSCOLOUR_SEL_FG,
NSCOLOUR_SEL_FG_SUBTLE,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=3626a5654e858ca6915327628e58a09e938392f4
commit 3626a5654e858ca6915327628e58a09e938392f4
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Plot style: Helper macro to get nearest of black and white.
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h
index 15069a5..c406092 100644
--- a/include/netsurf/plot_style.h
+++ b/include/netsurf/plot_style.h
@@ -170,6 +170,11 @@ typedef struct plot_font_style {
(((c0 & 0x00ff00) * 151) >> 16) + \
(((c0 & 0xff0000) * 28) >> 24))
+/* Choose either black or white, depending on which is nearest to the
+ * percieved lightness of the supplied colour, c0. */
+#define colour_to_bw_nearest(c0) \
+ ((colour_lightness(c0) > (0xff / 2)) ? 0xffffff : 0x000000)
+
/* Choose either black or white, depending on which is furthest from the
* percieved lightness of the supplied colour, c0. */
#define colour_to_bw_furthest(c0) \
-----------------------------------------------------------------------
Summary of changes:
desktop/treeview.c | 6 +++---
include/netsurf/plot_style.h | 5 +++++
utils/nscolour.c | 8 ++++++++
utils/nscolour.h | 3 +++
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 3f2054b..8079a1b 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -2050,9 +2050,9 @@ treeview_create(treeview **tree,
if (flags & TREEVIEW_SEARCHABLE) {
(*tree)->search.textarea = treeview__create_textarea(
*tree, 600, tree_g.line_height,
- plot_style_even.text.background,
- plot_style_even.text.background,
- plot_style_even.text.foreground,
+ nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_FG],
plot_style_odd.text,
treeview_textarea_search_callback);
if ((*tree)->search.textarea == NULL) {
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h
index 15069a5..c406092 100644
--- a/include/netsurf/plot_style.h
+++ b/include/netsurf/plot_style.h
@@ -170,6 +170,11 @@ typedef struct plot_font_style {
(((c0 & 0x00ff00) * 151) >> 16) + \
(((c0 & 0xff0000) * 28) >> 24))
+/* Choose either black or white, depending on which is nearest to the
+ * percieved lightness of the supplied colour, c0. */
+#define colour_to_bw_nearest(c0) \
+ ((colour_lightness(c0) > (0xff / 2)) ? 0xffffff : 0x000000)
+
/* Choose either black or white, depending on which is furthest from the
* percieved lightness of the supplied colour, c0. */
#define colour_to_bw_furthest(c0) \
diff --git a/utils/nscolour.c b/utils/nscolour.c
index e66fbf8..0b36bab 100644
--- a/utils/nscolour.c
+++ b/utils/nscolour.c
@@ -183,6 +183,14 @@ nserror nscolour_update(void)
return res;
}
+ nscolours[NSCOLOUR_TEXT_INPUT_BG] =
+ colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_BG]);
+ nscolours[NSCOLOUR_TEXT_INPUT_FG] =
+ colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_FG]);
+ nscolours[NSCOLOUR_TEXT_INPUT_FG_SUBTLE] =
+ blend_colour(nscolours[NSCOLOUR_TEXT_INPUT_BG],
+ nscolours[NSCOLOUR_TEXT_INPUT_FG]);
+
return NSERROR_OK;
}
diff --git a/utils/nscolour.h b/utils/nscolour.h
index 910d7f7..855a398 100644
--- a/utils/nscolour.h
+++ b/utils/nscolour.h
@@ -47,6 +47,9 @@ enum nscolour {
NSCOLOUR_WIN_EVEN_FG_GOOD,
NSCOLOUR_WIN_EVEN_FG_BAD,
NSCOLOUR_WIN_EVEN_BORDER,
+ NSCOLOUR_TEXT_INPUT_BG,
+ NSCOLOUR_TEXT_INPUT_FG,
+ NSCOLOUR_TEXT_INPUT_FG_SUBTLE,
NSCOLOUR_SEL_BG,
NSCOLOUR_SEL_FG,
NSCOLOUR_SEL_FG_SUBTLE,
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]