Merge pull request 'master' (#19) from YanTheKaller/ubl-settings-info:master into master
Reviewed-on: #19pull/21/head
commit
9a58f15e1e
@ -1,11 +1,12 @@
|
|||||||
ubl-util-standard.glade~
|
|
||||||
ubl-settings-info
|
|
||||||
/css/
|
|
||||||
/ui/
|
|
||||||
.vscode/
|
.vscode/
|
||||||
/ubl-standard-ui.c
|
ubl-settings-info
|
||||||
ubl-settings-info.glade~
|
*~
|
||||||
*ubl-settings-info.glade#
|
build/
|
||||||
*.o
|
compile/
|
||||||
source/ubl-util-standard-ui.c
|
*#
|
||||||
source/ubl-util-standard-ui.h
|
terminal-commands/
|
||||||
|
source/ubl-cmake.h
|
||||||
|
vgcore*
|
||||||
|
.BUILD.md
|
||||||
|
.updatebuild.sh
|
||||||
|
.install.sh
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/com/ublinux/ui">
|
||||||
|
<file>ubl-settings-info.glade</file>
|
||||||
|
</gresource>
|
||||||
|
<gresource prefix="/com/ublinux/css">
|
||||||
|
<file>ubl-settings-info.css</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
||||||
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 33 KiB |
@ -0,0 +1,51 @@
|
|||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <gtk/gtkx.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <libintl.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
#include <libublsettings.h>
|
||||||
|
#include <libublsettings-gtk3.h>
|
||||||
|
#include <libublsettingsui-gtk3.h>
|
||||||
|
#include "ubl-strings.h"
|
||||||
|
|
||||||
|
#define _(String) gettext(String)
|
||||||
|
|
||||||
|
#define glade_path "/com/ublinux/ui/ubl-settings-info.glade"
|
||||||
|
#define CssPath "/com/ublinux/css/ubl-settings-info.css"
|
||||||
|
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
|
||||||
|
#define icon_path "com.ublinux.ubl-settings-info"
|
||||||
|
|
||||||
|
#define logo_icon_path "/usr/share/pixmaps/ublinux-logo-text.png"
|
||||||
|
#define logo_dark_icon_path "/usr/share/pixmaps/ublinux-logo-text-dark.png"
|
||||||
|
|
||||||
|
#define LocaleName "ubl-settings-info"
|
||||||
|
|
||||||
|
#define main_command _("fastfetch --logo none --disable-linewrap --config all.jsonc")
|
||||||
|
|
||||||
|
typedef char* string;
|
||||||
|
|
||||||
|
__attribute__((unused)) static \
|
||||||
|
string version_application;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
template_config_fields
|
||||||
|
int save_config;
|
||||||
|
config_str launch_arguments;
|
||||||
|
int launch_size;
|
||||||
|
} config;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
template_window_fields
|
||||||
|
GtkWidget *InfoIcon;
|
||||||
|
GtkWidget *InfoTerminal;
|
||||||
|
GtkWidget *TerminalTemplateLabel;
|
||||||
|
} main_window;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void yon_main_window_complete(main_window *widgets);
|
||||||
|
void on_theme_changed(GSettings *, char *, main_window *widgets);
|
||||||
|
void yon_terminal_style_update(VteTerminal *, main_window *widgets);
|
||||||
@ -1,82 +0,0 @@
|
|||||||
#include "ubl-util-standard.h"
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#ifndef UBL_GET_STANDARD_UI
|
|
||||||
#define UBL_GET_STANDARD_UI
|
|
||||||
|
|
||||||
|
|
||||||
inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id){
|
|
||||||
returnstruct *ret=(returnstruct*)malloc(sizeof(returnstruct*));
|
|
||||||
if (left_plug_id>0&&LeftWidget){
|
|
||||||
GtkWidget *plug=gtk_plug_new(left_plug_id);
|
|
||||||
GtkWidget *toplug=LeftWidget;
|
|
||||||
gtk_widget_set_visual(plug,gdk_screen_get_rgba_visual(gtk_widget_get_screen(plug)));
|
|
||||||
gtk_widget_set_app_paintable(plug,1);
|
|
||||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
|
||||||
g_object_ref(G_OBJECT(toplug));
|
|
||||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
|
||||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
} else
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
gtk_widget_show(GTK_WIDGET(plug));
|
|
||||||
ret->plugLeft=plug;
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar");
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"button");
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"opacited");
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"color");
|
|
||||||
}
|
|
||||||
if (right_plug_id>0&&RightWidget){
|
|
||||||
GtkWidget *plug=gtk_plug_new(right_plug_id);
|
|
||||||
GtkWidget *toplug=RightWidget;
|
|
||||||
gtk_widget_set_visual(plug,gdk_screen_get_rgba_visual(gtk_widget_get_screen(plug)));
|
|
||||||
gtk_widget_set_app_paintable(plug,1);
|
|
||||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
|
||||||
g_object_ref(G_OBJECT(toplug));
|
|
||||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
|
||||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
} else
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
gtk_widget_show(GTK_WIDGET(plug));
|
|
||||||
ret->plugRight=plug;
|
|
||||||
|
|
||||||
GtkStyleContext *context = gtk_widget_get_style_context(plug);
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar");
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"opacited");
|
|
||||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"color");
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
|
|
||||||
inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id){
|
|
||||||
if (left_plug_id>0&&LeftWidget){
|
|
||||||
GtkWidget *plug=gtk_plug_new(left_plug_id);
|
|
||||||
GtkWidget *toplug=GTK_WIDGET(LeftWidget->gobj());
|
|
||||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
|
||||||
g_object_ref(G_OBJECT(toplug));
|
|
||||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
|
||||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
} else
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
gtk_widget_show(GTK_WIDGET(plug));
|
|
||||||
}
|
|
||||||
if (right_plug_id>0&&RightWidget){
|
|
||||||
GtkWidget *plug=gtk_plug_new(right_plug_id);
|
|
||||||
GtkWidget *toplug=GTK_WIDGET(RightWidget->gobj());
|
|
||||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
|
||||||
g_object_ref(G_OBJECT(toplug));
|
|
||||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
|
||||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
} else
|
|
||||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
|
||||||
gtk_widget_show(GTK_WIDGET(plug));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
#ifndef __cplusplus
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkx.h>
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GtkWidget *plugLeft;
|
|
||||||
GtkWidget *plugRight;
|
|
||||||
|
|
||||||
|
|
||||||
} returnstruct;
|
|
||||||
static returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id);
|
|
||||||
#else
|
|
||||||
#include <gtkmm.h>
|
|
||||||
#include <gtkmm/stock.h>
|
|
||||||
#include <gtkmm/window.h>
|
|
||||||
#include <gtkmm/plug.h>
|
|
||||||
|
|
||||||
|
|
||||||
static void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id);
|
|
||||||
#endif
|
|
||||||
@ -1,44 +1,131 @@
|
|||||||
|
|
||||||
|
.thin {
|
||||||
|
margin:0px;
|
||||||
|
padding:0px;
|
||||||
|
}
|
||||||
|
.noborder {
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
.nobackground {
|
||||||
|
background:transparent;
|
||||||
|
}
|
||||||
|
.nobackground:active {
|
||||||
|
background:transparent;
|
||||||
|
}
|
||||||
.textHead{
|
.textHead{
|
||||||
text-shadow: 2px 2px @theme_bg_color;
|
text-shadow: 2px 2px @theme_bg_color;
|
||||||
color: @theme_text_color;
|
color: @theme_text_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.inherited>* {
|
||||||
background-image: -gtk-gradient(linear,
|
|
||||||
left top, left bottom,
|
|
||||||
from(@entry_background_a),
|
|
||||||
color-stop(0.20, @entry_background_b),
|
|
||||||
color-stop(0.85, @entry_background_c),
|
|
||||||
to(@entry_background_d));
|
|
||||||
}
|
|
||||||
.opacited {
|
|
||||||
transition: 0ms ease-out;
|
|
||||||
opacity:0.98;
|
|
||||||
border:none;
|
border:none;
|
||||||
border-radius:0px;
|
background:inherit;
|
||||||
}
|
}
|
||||||
.color {
|
.workingbg {
|
||||||
background-color: inherit;
|
background:@theme_base_color;
|
||||||
}
|
}
|
||||||
.menuitemsolo {
|
.menuitembottom{
|
||||||
border-color:alpha(@theme_text_color, 0.4);
|
margin-top:0px;
|
||||||
border-style:solid;
|
margin-bottom:3px;
|
||||||
border-width:inherit;
|
border-color:inherit;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
|
}
|
||||||
|
.menuitemmiddle{
|
||||||
|
margin-top:0px;
|
||||||
|
margin-bottom:0px;
|
||||||
|
border-color:inherit;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuitemtop{
|
||||||
|
margin-bottom:0px;
|
||||||
|
border-color:inherit;
|
||||||
|
border-top-width:inherit;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
|
}
|
||||||
|
.menuitemtop >*{
|
||||||
|
margin:6px 2px 0 2px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
border:transparent;
|
||||||
|
}
|
||||||
|
.menuitemmiddle >*{
|
||||||
|
margin:0 2px 0 2px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
border:transparent;
|
||||||
}
|
}
|
||||||
.menuitemsolo *{
|
.menuitembottom >*{
|
||||||
margin:0 2px 2px 2px;
|
margin:0 2px 2px 2px;
|
||||||
padding: 3px 10px 5px 5px;
|
padding: 3px 10px 3px 5px;
|
||||||
|
}
|
||||||
|
.menuitemtop:hover {
|
||||||
|
background:@theme_bg_color;
|
||||||
|
border-color:inherit;
|
||||||
|
border-top-width:inherit;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
}
|
}
|
||||||
.menuitemsolo:hover {
|
.menuitemmiddle:hover {
|
||||||
background:@theme_bg_color;
|
background:@theme_bg_color;
|
||||||
border:inherit;
|
border-color:inherit;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
|
}
|
||||||
|
.menuitembottom:hover {
|
||||||
|
background:@theme_bg_color;
|
||||||
|
border-color:inherit;
|
||||||
|
border-bottom-width:0px;
|
||||||
|
border-left-width:inherit;
|
||||||
|
border-right-width:inherit;
|
||||||
|
|
||||||
}
|
}
|
||||||
.menuitemsolo:hover* {
|
.menuitemtop:hover>* {
|
||||||
|
margin:6px 2px 0 2px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
background:@theme_selected_bg_color;
|
||||||
|
border-radius:2px;
|
||||||
|
}
|
||||||
|
.menuitemmiddle:hover>* {
|
||||||
|
margin:0 2px 0 2px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
background:@theme_selected_bg_color;
|
||||||
|
border-radius:2px;
|
||||||
|
}
|
||||||
|
.menuitembottom:hover>* {
|
||||||
margin:0 2px 2px 2px;
|
margin:0 2px 2px 2px;
|
||||||
padding: 3px 10px 5px 5px;
|
padding: 3px 10px 3px 5px;
|
||||||
background:@theme_selected_bg_color;
|
background:@theme_selected_bg_color;
|
||||||
border-color:transparent;
|
|
||||||
border-radius:2px;
|
border-radius:2px;
|
||||||
}
|
}
|
||||||
|
.boxInfoMessError{
|
||||||
|
background-color: #ea9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxInfoMessOK{
|
||||||
|
background-color: #f3f0ac;
|
||||||
|
}
|
||||||
|
.errorBox {
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #ea9999;
|
||||||
|
border-style:solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chosenOutline{
|
||||||
|
transition: 0ms;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #f3f0ac;
|
||||||
|
border-style:solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debugborders *{
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #000000;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminaltemplate{
|
||||||
|
background: @theme_bg_color;
|
||||||
|
color: @theme_fg_color;
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 14 KiB |
Loading…
Reference in new issue