Added content_halign option
This commit is contained in:
parent
d06ed4e023
commit
a40a8be7f5
@ -45,6 +45,7 @@ static struct map* modes;
|
|||||||
static enum matching_mode matching;
|
static enum matching_mode matching;
|
||||||
static bool insensitive;
|
static bool insensitive;
|
||||||
static bool parse_search;
|
static bool parse_search;
|
||||||
|
static uint8_t content_halign;
|
||||||
static struct map* config;
|
static struct map* config;
|
||||||
|
|
||||||
struct node {
|
struct node {
|
||||||
@ -223,6 +224,7 @@ char* wofi_parse_image_escapes(const char* text) {
|
|||||||
|
|
||||||
static GtkWidget* create_label(char* mode, char* text, char* search_text, char* action) {
|
static GtkWidget* create_label(char* mode, char* text, char* search_text, char* action) {
|
||||||
GtkWidget* box = wofi_property_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
GtkWidget* box = wofi_property_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
gtk_widget_set_halign(box, content_halign);
|
||||||
gtk_widget_set_name(box, "unselected");
|
gtk_widget_set_name(box, "unselected");
|
||||||
GtkStyleContext* style = gtk_widget_get_style_context(box);
|
GtkStyleContext* style = gtk_widget_get_style_context(box);
|
||||||
gtk_style_context_add_class(style, "entry");
|
gtk_style_context_add_class(style, "entry");
|
||||||
@ -719,6 +721,7 @@ void wofi_init(struct map* _config) {
|
|||||||
uint8_t orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal");
|
uint8_t orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal");
|
||||||
outer_orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "horizontal", "vertical");
|
outer_orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "horizontal", "vertical");
|
||||||
uint8_t halign = config_get_mnemonic(config, "halign", "fill", 4, "fill", "start", "end", "center");
|
uint8_t halign = config_get_mnemonic(config, "halign", "fill", 4, "fill", "start", "end", "center");
|
||||||
|
content_halign = config_get_mnemonic(config, "content_halign", "fill", 4, "fill", "start", "end", "center");
|
||||||
char* default_valign = "start";
|
char* default_valign = "start";
|
||||||
if(outer_orientation == GTK_ORIENTATION_HORIZONTAL) {
|
if(outer_orientation == GTK_ORIENTATION_HORIZONTAL) {
|
||||||
default_valign = "center";
|
default_valign = "center";
|
||||||
|
Loading…
Reference in New Issue
Block a user