mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Removed more scaling fonts by zoom factor
This commit is contained in:
parent
e5efbcbb9a
commit
e4f0a0f2e1
4 changed files with 0 additions and 43 deletions
|
@ -1465,9 +1465,6 @@ create_label_layout (NautilusIconCanvasItem *item,
|
||||||
desc = pango_font_description_from_string (container->details->font);
|
desc = pango_font_description_from_string (container->details->font);
|
||||||
} else {
|
} else {
|
||||||
desc = pango_font_description_copy (pango_context_get_font_description (context));
|
desc = pango_font_description_copy (pango_context_get_font_description (context));
|
||||||
pango_font_description_set_size (desc,
|
|
||||||
pango_font_description_get_size (desc) +
|
|
||||||
container->details->font_size_table [container->details->zoom_level]);
|
|
||||||
}
|
}
|
||||||
pango_layout_set_font_description (layout, desc);
|
pango_layout_set_font_description (layout, desc);
|
||||||
pango_font_description_free (desc);
|
pango_font_description_free (desc);
|
||||||
|
|
|
@ -5419,14 +5419,6 @@ nautilus_icon_container_init (NautilusIconContainer *container)
|
||||||
details->layout_timestamp = UNDEFINED_TIME;
|
details->layout_timestamp = UNDEFINED_TIME;
|
||||||
details->zoom_level = NAUTILUS_ZOOM_LEVEL_STANDARD;
|
details->zoom_level = NAUTILUS_ZOOM_LEVEL_STANDARD;
|
||||||
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_SMALLEST] = -2 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_SMALLER] = -2 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_SMALL] = -0 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_STANDARD] = 0 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_LARGE] = 0 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_LARGER] = 0 * PANGO_SCALE;
|
|
||||||
details->font_size_table[NAUTILUS_ZOOM_LEVEL_LARGEST] = 0 * PANGO_SCALE;
|
|
||||||
|
|
||||||
container->details = details;
|
container->details = details;
|
||||||
|
|
||||||
g_signal_connect (container, "focus-in-event",
|
g_signal_connect (container, "focus-in-event",
|
||||||
|
@ -7492,9 +7484,6 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con
|
||||||
} else {
|
} else {
|
||||||
context = gtk_widget_get_pango_context (GTK_WIDGET (container));
|
context = gtk_widget_get_pango_context (GTK_WIDGET (container));
|
||||||
desc = pango_font_description_copy (pango_context_get_font_description (context));
|
desc = pango_font_description_copy (pango_context_get_font_description (context));
|
||||||
pango_font_description_set_size (desc,
|
|
||||||
pango_font_description_get_size (desc) +
|
|
||||||
container->details->font_size_table [container->details->zoom_level]);
|
|
||||||
}
|
}
|
||||||
eel_editable_label_set_font_description (EEL_EDITABLE_LABEL (details->rename_widget),
|
eel_editable_label_set_font_description (EEL_EDITABLE_LABEL (details->rename_widget),
|
||||||
desc);
|
desc);
|
||||||
|
@ -7712,30 +7701,6 @@ nautilus_icon_container_set_font (NautilusIconContainer *container,
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (container));
|
gtk_widget_queue_draw (GTK_WIDGET (container));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_icon_container_set_font_size_table (NautilusIconContainer *container,
|
|
||||||
const int font_size_table[NAUTILUS_ZOOM_LEVEL_LARGEST + 1])
|
|
||||||
{
|
|
||||||
int old_font_size;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container));
|
|
||||||
g_return_if_fail (font_size_table != NULL);
|
|
||||||
|
|
||||||
old_font_size = container->details->font_size_table[container->details->zoom_level];
|
|
||||||
|
|
||||||
for (i = 0; i <= NAUTILUS_ZOOM_LEVEL_LARGEST; i++) {
|
|
||||||
if (container->details->font_size_table[i] != font_size_table[i]) {
|
|
||||||
container->details->font_size_table[i] = font_size_table[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (old_font_size != container->details->font_size_table[container->details->zoom_level]) {
|
|
||||||
invalidate_labels (container);
|
|
||||||
nautilus_icon_container_request_update_all (container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nautilus_icon_container_get_icon_description
|
* nautilus_icon_container_get_icon_description
|
||||||
* @container: An icon container widget.
|
* @container: An icon container widget.
|
||||||
|
|
|
@ -321,8 +321,6 @@ void nautilus_icon_container_set_is_desktop (Nautilu
|
||||||
void nautilus_icon_container_reset_scroll_region (NautilusIconContainer *container);
|
void nautilus_icon_container_reset_scroll_region (NautilusIconContainer *container);
|
||||||
void nautilus_icon_container_set_font (NautilusIconContainer *container,
|
void nautilus_icon_container_set_font (NautilusIconContainer *container,
|
||||||
const char *font);
|
const char *font);
|
||||||
void nautilus_icon_container_set_font_size_table (NautilusIconContainer *container,
|
|
||||||
const int font_size_table[NAUTILUS_ZOOM_LEVEL_LARGEST + 1]);
|
|
||||||
void nautilus_icon_container_set_margins (NautilusIconContainer *container,
|
void nautilus_icon_container_set_margins (NautilusIconContainer *container,
|
||||||
int left_margin,
|
int left_margin,
|
||||||
int right_margin,
|
int right_margin,
|
||||||
|
|
|
@ -200,9 +200,6 @@ struct NautilusIconContainerDetails {
|
||||||
/* specific fonts used to draw labels */
|
/* specific fonts used to draw labels */
|
||||||
char *font;
|
char *font;
|
||||||
|
|
||||||
/* font sizes used to draw labels */
|
|
||||||
int font_size_table[NAUTILUS_ZOOM_LEVEL_LARGEST + 1];
|
|
||||||
|
|
||||||
/* State used so arrow keys don't wander if icons aren't lined up.
|
/* State used so arrow keys don't wander if icons aren't lined up.
|
||||||
*/
|
*/
|
||||||
int arrow_key_start_x;
|
int arrow_key_start_x;
|
||||||
|
|
Loading…
Reference in a new issue