Compare commits

..

2 Commits

Author SHA1 Message Date
e9950d648a make initial page blank 2024-03-14 16:31:07 -03:00
6d925ea23a remove most custom style (but leave large font)
gtk default already looks amazing
2024-03-14 16:05:54 -03:00
13 changed files with 86 additions and 35 deletions

View File

@ -4,7 +4,7 @@ Rosenrot is a small browser forked from an earlier version of [rose](https://git
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png) ![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png)
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/6-hello-world.png) ![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/3-multiple-tabs.png)
### Installation and usage ### Installation and usage

View File

@ -15,9 +15,11 @@
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */ #define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
#define DEBUG false #define DEBUG false
#define MAX_NUM_TABS 8 // set to 0 or false if you want unlimited tabs, or look at the relevant rose.c code. #define MAX_NUM_TABS 8 // set to 0 or false if you want unlimited tabs, or look at the relevant rose.c code.
#define ROSE_HOMEPAGE false #define SEARCH "https://search.nunosempere.com/search?q=%s"
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s" // #define SEARCH "https://lite.duckduckgo.com/html/?q=%s"
#define HOME ROSE_HOMEPAGE ? "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png" : "https://search.nunosempere.com/" #define HOME ""
// #define HOME "https://search.nunosempere.com/"
// #define HOME "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png"
// Plugins // Plugins
#define LIBRE_REDIRECT_ENABLED true #define LIBRE_REDIRECT_ENABLED true

BIN
images/3-init.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

BIN
images/6-multiple-tabs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 123 KiB

BIN
rosenrot

Binary file not shown.

View File

@ -26,9 +26,16 @@ WebKitWebView* notebook_get_webview(GtkNotebook* notebook)
} }
/* Load content*/ /* Load content*/
void show_bar(GtkNotebook* notebook);
void load_uri(WebKitWebView* view, const char* uri) void load_uri(WebKitWebView* view, const char* uri)
{ {
if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) { if (strlen(uri) == 0){
webkit_web_view_load_uri(view, "");
bar.entry_mode = _SEARCH;
show_bar(notebook);
}else if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) {
webkit_web_view_load_uri(view, uri); webkit_web_view_load_uri(view, uri);
} else { } else {
// Check for shortcuts // Check for shortcuts
@ -407,7 +414,7 @@ int main(int argc, char** argv)
gtk_init(NULL, NULL); // <https://docs.gtk.org/gtk3/func.init.html> gtk_init(NULL, NULL); // <https://docs.gtk.org/gtk3/func.init.html>
g_object_set(gtk_settings_get_default(), GTK_SETTINGS_CONFIG_H, NULL); // <https://docs.gtk.org/gobject/method.Object.set.html> g_object_set(gtk_settings_get_default(), GTK_SETTINGS_CONFIG_H, NULL); // <https://docs.gtk.org/gobject/method.Object.set.html>
GtkCssProvider* css = gtk_css_provider_new(); GtkCssProvider* css = gtk_css_provider_new();
gtk_css_provider_load_from_path(css, "/usr/share/themes/rose/style.css", NULL); gtk_css_provider_load_from_path(css, "/usr/share/themes/rosenrot/style.css", NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), 800); gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), 800);
/* Initialize GTK objects. These are declared as static globals at the top of this file */ /* Initialize GTK objects. These are declared as static globals at the top of this file */
@ -440,7 +447,7 @@ int main(int argc, char** argv)
/* Show to user */ /* Show to user */
gtk_widget_show_all(GTK_WIDGET(window)); gtk_widget_show_all(GTK_WIDGET(window));
gtk_widget_hide(GTK_WIDGET(bar.widget)); // gtk_widget_hide(GTK_WIDGET(bar.widget));
/* Deal with more tabs */ /* Deal with more tabs */
if (argc > 2) { if (argc > 2) {

View File

@ -1,25 +1,9 @@
@define-color Surface0 #313244;
@define-color Surface1 #45475a;
@define-color Base #1e1e2e;
@define-color Mantle #181825;
@define-color Lavender #b4befe;
@define-color Text #cdd6f4;
* { * {
padding: 0px;
margin: 0px;
outline-color: @Lavender;
color: @Text;
border-color: white;
font-size: 25px; font-size: 25px;
/*@Base; */ /*@Base; */
/* border-bottom-color: @Base; */ /* border-bottom-color: @Base; */
} }
window, notebook, headerbar {
background: @Base;
}
/* Make titlebar pretty gigantic. I'm pretty myopic. */ /* Make titlebar pretty gigantic. I'm pretty myopic. */
.titlebar { .titlebar {
padding: 10px; padding: 10px;
@ -38,33 +22,21 @@ header * {
} }
tabs { tabs {
background-color: @Base;
padding: 3px; padding: 3px;
outline-color: white;
border-color: @Base;
} }
tab { tab {
background-color: @Base;
margin: 2px 5px 2px 0px; margin: 2px 5px 2px 0px;
padding: 5px; padding: 5px;
border-style: solid; border-style: solid;
font-size: 27px; font-size: 27px;
/*border-color: white;
border-bottom-color: white;
outline-color: white;
margin: 5px;
padding-left: 10px;
padding-right: 10px; */
} }
entry { entry {
background-color: @Surface0;
padding-left: 10px; padding-left: 10px;
} }
entry:focus { entry:focus {
background-color: @Surface0;
padding-left: 10px; padding-left: 10px;
} }

View File

@ -0,0 +1,70 @@
@define-color Surface0 #313244;
@define-color Surface1 #45475a;
@define-color Base #1e1e2e;
@define-color Mantle #181825;
@define-color Lavender #b4befe;
@define-color Text #cdd6f4;
* {
padding: 0px;
margin: 0px;
outline-color: @Lavender;
color: @Text;
border-color: white;
font-size: 25px;
/*@Base; */
/* border-bottom-color: @Base; */
}
window, notebook, headerbar {
background: @Base;
}
/* Make titlebar pretty gigantic. I'm pretty myopic. */
.titlebar {
padding: 10px;
font-size: 30px;
}
.titlebar * {
padding: 10px;
font-size: 27px;
}
header * {
font-size: 20px;
padding: 5px;
}
tabs {
background-color: @Base;
padding: 3px;
outline-color: white;
border-color: @Base;
}
tab {
background-color: @Base;
margin: 2px 5px 2px 0px;
padding: 5px;
border-style: solid;
font-size: 27px;
/*border-color: white;
border-bottom-color: white;
outline-color: white;
margin: 5px;
padding-left: 10px;
padding-right: 10px; */
}
entry {
background-color: @Surface0;
padding-left: 10px;
}
entry:focus {
background-color: @Surface0;
padding-left: 10px;
}