mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-24 21:20:12 +00:00
Load style sheet
This commit is contained in:
parent
07c494bc43
commit
cca2e2f48b
9
src/ui/glade/style.css
Normal file
9
src/ui/glade/style.css
Normal file
@ -0,0 +1,9 @@
|
||||
.enter_button{
|
||||
background: #ff3f4e;
|
||||
color: #ffffff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.enter_button:disabled{
|
||||
color: #ffffff;
|
||||
}
|
14
src/ui/ui.c
14
src/ui/ui.c
@ -7,6 +7,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include "h_prop.h"
|
||||
#include "ui.h"
|
||||
@ -43,6 +44,10 @@ GtkProgressBar *progress_bar;
|
||||
|
||||
GtkLabel *label_status;
|
||||
|
||||
GtkCssProvider* provider;
|
||||
GdkDisplay *display;
|
||||
GdkScreen *screen;
|
||||
|
||||
GError *error = NULL;
|
||||
|
||||
|
||||
@ -89,6 +94,15 @@ static void on_stop_hp_clicked(GtkWidget *widget, gpointer data) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void loadStyles(){
|
||||
provider = gtk_css_provider_new();
|
||||
display = gdk_display_get_default();
|
||||
screen = gdk_display_get_default_screen (display);
|
||||
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||
gtk_css_provider_load_from_path(GTK_CSS_PROVIDER(provider),"glade/style.css",NULL);
|
||||
}
|
||||
|
||||
int initUi(int argc, char *argv[]){
|
||||
|
||||
XInitThreads();
|
||||
|
Loading…
Reference in New Issue
Block a user