icon fixes, empty space in bottom part of icons fixed

pull/9/head
parent 24e253c697
commit 20d27964e5

1
.gitignore vendored

@ -6,6 +6,7 @@ msgformat.py
calendarApp.glade
calendarApp.glade~
ubl-settings-manager.glade~
*ubl-settings-manager.glade#
ubl-settings-manager
**base.mo
home/

@ -177,7 +177,6 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
else if (main_config.WindowTheme==1)
main_config.curThemeName="Gnome";
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
// printf("Saving config...\n");
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
@ -274,8 +273,7 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi
int position=gtk_paned_get_position(GTK_PANED(widgets->GnomePaned));
if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);}
main_config.iconSegmentSize=position;
// if (position <70) {position=70;}
double pos=((double)position-35);
double pos=((double)position-20);
if (pos<70) pos=70;
for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){
IVGraphicals *IV=(IVGraphicals*)dict->data;
@ -643,11 +641,6 @@ void on_resized (GtkWidget *window, GdkEventConfigure *event, dictionary *widget
gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main"));
*main_config.currentThemeIconSize=24;
// for (dictionary *dict=widgets->ICSys->first;dict!=NULL;dict=dict->next){
// IVGraphicals *IV=(IVGraphicals*)dict->data;
// load_apps_with_clear(IV,widgets->applist,widgets->appssize);
// }
gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
gtk_widget_hide(widgets->window);
}
@ -676,7 +669,6 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
int *icsize;
int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
// main_config.changed=1;
if (curthm==0){
main_config.currentThemeIconSize=&main_config.Mainiconsize;
main_config.currentThemeLabelSize=&main_config.MainlabelSize;
@ -720,7 +712,6 @@ void on_about(GtkWidget *button){
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(About),version_application);
gtk_widget_show(About);
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(About),_("Project Home Page"));
// gtk_label_set_text(GTK_LABEL(HeaderAboutTopic),_("About UBLinux Settings Manager"));
gtk_widget_set_visible(AboutButtons,0);
}
@ -783,12 +774,12 @@ int load_apps(IVGraphicals *section, apps *applist, int size){
GError *err=NULL;
GtkTreeIter iter;
gtk_list_store_append(section->LV,&iter);
int sz= yon_get_icon_size(*main_config.currentThemeIconSize)+10;
if (sz<50) sz=50;
int sz= yon_get_icon_size(*main_config.currentThemeIconSize)+3;
if (sz<34) sz=34;
GtkIconTheme *icthm=gtk_icon_theme_get_default();
GdkPixbuf *pixbuf=gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL);
GdkPixbuf *pixbuf=gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SIZE),NULL);
GtkTreePath *pth = gtk_tree_model_get_path(GTK_TREE_MODEL(section->LV),&iter);
gtk_list_store_set(section->LV,&iter,0,applist[i].Name,1,0.0,2,0.5, 3, sz+8, 4, pixbuf, 5,yon_get_icon_size(*main_config.currentThemeIconSize)+10, -1);
gtk_list_store_set(section->LV,&iter,0,applist[i].Name,1,0.0,2,0.5, 3, sz+5, 4, pixbuf, 5,yon_get_icon_size(*main_config.currentThemeIconSize)+10, -1);
int cols = gtk_icon_view_get_columns(GTK_ICON_VIEW(section->IV));
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), -1);
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), cols);
@ -1166,8 +1157,6 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
gtk_widget_set_margin_end(label,6);
gtk_widget_set_margin_start(label,6);
gtk_widget_set_margin_bottom(label,2);
// gtk_widget_set_name(label,"workingbg");
// gtk_widget_set_name(box,"workingbg");
gtk_icon_view_set_spacing(GTK_ICON_VIEW(iv),20);
if (main_config.WindowTheme==1) {
gtk_icon_view_set_columns(GTK_ICON_VIEW(iv),1);
@ -1176,11 +1165,9 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
} else {
gtk_icon_view_set_item_padding(GTK_ICON_VIEW(iv),3);
//gtk_widget_set_name(iv,"workingbg");
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(iv),2);
}
gtk_icon_view_set_text_column(GTK_ICON_VIEW(iv),0);
GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
GtkListStore *lv=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststoreTemplate"));
gtk_widget_set_name(sep,"SepIcon");
@ -1266,7 +1253,7 @@ void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned){
for (dictionary *dict=icdict->first;dict!=NULL;dict=dict->next){
IVGraphicals *icv=(IVGraphicals*)dict->data;
int width=gtk_paned_get_position(GTK_PANED(paned));
int pos=(int)((double)width);
int pos=(int)((double)width-20);
if (pos < 100) pos=100;
gtk_icon_view_set_item_width(GTK_ICON_VIEW(icv->IV),pos);
@ -1371,7 +1358,7 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){
int yon_get_icon_size(int size){
if (size==1||size==24) return 24;
if (size==2||size==32) return 32;
if (size==3||size==48) return 51;
if (size==3||size==48) return 48;
if (size==4||size==64) return 64;
}
@ -1602,7 +1589,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
// g_signal_connect(G_OBJECT(curWidgets->MenuItemAboutSystem), "activate", G_CALLBACK(on_about_system),curWidgets);
if (curWidgets->ButtonBackToMain!=NULL)
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
@ -1613,7 +1599,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
}
g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
if (strcmp(theme_id,"Gnome")==0){
// on_about_system(NULL,curWidgets);
g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets);
}
@ -1676,12 +1661,10 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsCloseButton), "clicked", G_CALLBACK(on_sections_close), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->CautionUnderstandButton), "clicked", G_CALLBACK(on_caution_understand), curWidgets);
// g_signal_connect(G_OBJECT(curWidgets->infoWarningButton), "clicked", G_CALLBACK(on_info_warning_closed), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->settingsSectionsSettingsButton), "clicked", G_CALLBACK(on_section_settings_open), widgets);
}
g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(yon_main_quit), curWidgets);
gtk_label_set_text(GTK_LABEL(curWidgets->LabelTitle),_("UBLinux Settings Manager"));
// gtk_label_set_text(GTK_LABEL(curWidgets->infoWarningLabel),_("Looks like you don't have ubl-settings-info installed on your PC."));
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelSize),_("Icon size"));
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelTheme),_("Window theme"));
gtk_label_set_text(GTK_LABEL(curWidgets->helpHeader),_("Would you like to read documentation in the Web?"));
@ -1693,7 +1676,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect"));
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings"));
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About..."));
// gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),_("About system"));
gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood"));
gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Sections management"));
return widgets;

@ -1594,7 +1594,17 @@
<attribute name="xalign">1</attribute>
<attribute name="yalign">2</attribute>
<attribute name="pixbuf">4</attribute>
<attribute name="stock-size">5</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText">
<property name="xalign">0</property>
<property name="wrap-mode">word</property>
<property name="wrap-width">18</property>
</object>
<attributes>
<attribute name="height">3</attribute>
<attribute name="text">0</attribute>
</attributes>
</child>
<style>

Loading…
Cancel
Save