mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 10:50:08 +00:00
b529f77827
We had a pretty complex setup where we tried to avoid scaling up themes from dirs that specified a size. However, not only was it very complex, but it didn't quite work with window scales, because when using e.g. a size 32 directory for 16@2x the dir size is wrong anyway. Additionally it turns out most code either picks an existing icon size, or uses the FORCE_SIZE flags, so it doesn't seem like a useful behaviour. This change drops the FORCE_SIZE flags, and always scales icons. Additionally it moves the scaling of the icon to rendering, which seems more modern, and allows us to (later) share icons loaded for different sizes that happened to use the same source file (at different scales). Note that this changes the behaviour of gtk_icon_paintable_download_texture() is it now returns the unscaled source icon. However, ignore thats, as I plan to remove this function and replace it with a way to render a paintable to a cairo-surface instead.
394 lines
15 KiB
XML
394 lines
15 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<interface>
|
||
<object class="IconStore" id="store"/>
|
||
<object class="GtkTreeModelFilter" id="filter_model">
|
||
<property name="child-model">store</property>
|
||
</object>
|
||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||
<style>
|
||
<class name="devel"/>
|
||
</style>
|
||
<property name="title" translatable="yes">Icon Browser</property>
|
||
<property name="default-width">1024</property>
|
||
<property name="default-height">768</property>
|
||
<child type="titlebar">
|
||
<object class="GtkHeaderBar" id="header">
|
||
<property name="title" translatable="yes">Icon Browser</property>
|
||
<property name="show-title-buttons">1</property>
|
||
<child type="title">
|
||
<object class="GtkBox">
|
||
<style>
|
||
<class name="linked"/>
|
||
</style>
|
||
<child>
|
||
<object class="GtkRadioButton" id="normal_radio">
|
||
<property name="draw-indicator">0</property>
|
||
<property name="label" translatable="yes">Normal</property>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkRadioButton" id="symbolic_radio">
|
||
<property name="draw-indicator">0</property>
|
||
<property name="label" translatable="yes">Symbolic</property>
|
||
<property name="group">normal_radio</property>
|
||
<signal name="toggled" handler="symbolic_toggled"/>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
<child type="end">
|
||
<object class="GtkToggleButton" id="search">
|
||
<style>
|
||
<class name="image-button"/>
|
||
</style>
|
||
<child>
|
||
<object class="GtkImage" id="search-icon">
|
||
<property name="icon-name">edit-find-symbolic</property>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkBox">
|
||
<child>
|
||
<object class="GtkListBox" id="context_list">
|
||
<signal name="selected-rows-changed" handler="selected_context_changed"/>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkSeparator">
|
||
<property name="orientation">vertical</property>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkBox" id="content_box">
|
||
<property name="orientation">vertical</property>
|
||
<child>
|
||
<object class="GtkSearchBar" id="searchbar">
|
||
<property name="search-mode-enabled" bind-source="search" bind-property="active" bind-flags="bidirectional"/>
|
||
<child>
|
||
<object class="GtkSearchEntry" id="searchentry">
|
||
<signal name="search-changed" handler="search_text_changed"/>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkScrolledWindow" id="sw">
|
||
<property name="expand">1</property>
|
||
<property name="hscrollbar-policy">never</property>
|
||
<child>
|
||
<object class="GtkIconView" id="list">
|
||
<property name="model">filter_model</property>
|
||
<property name="selection-mode">none</property>
|
||
<property name="activate-on-single-click">1</property>
|
||
<signal name="item_activated" handler="item_activated"/>
|
||
<child>
|
||
<object class="GtkCellRendererPixbuf" id="cell">
|
||
<property name="xpad">10</property>
|
||
<property name="ypad">10</property>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkCellRendererText" id="text_cell">
|
||
<property name="xpad">10</property>
|
||
<property name="ypad">10</property>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</template>
|
||
<object class="GtkSizeGroup">
|
||
<property name="mode">vertical</property>
|
||
<widgets>
|
||
<widget name="normal_radio"/>
|
||
<widget name="symbolic_radio"/>
|
||
<widget name="search"/>
|
||
</widgets>
|
||
</object>
|
||
<object class="GtkDialog" id="details">
|
||
<property name="modal">1</property>
|
||
<property name="use-header-bar">1</property>
|
||
<property name="resizable">0</property>
|
||
<property name="hide-on-close">1</property>
|
||
<child internal-child="content_area">
|
||
<object class="GtkBox">
|
||
<property name="orientation">vertical</property>
|
||
<child>
|
||
<object class="GtkGrid">
|
||
<property name="margin">10</property>
|
||
<property name="row-spacing">18</property>
|
||
<property name="column-spacing">18</property>
|
||
<property name="halign">center</property>
|
||
<child>
|
||
<object class="GtkImage" id="image1">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label1"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">0</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image2">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label2"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">1</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image3">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label3"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">2</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image4">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label4"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">3</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image5">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label5"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">4</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image6">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label5"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">5</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image7">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label5"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">6</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkImage" id="image8">
|
||
<property name="halign">center</property>
|
||
<property name="valign">end</property>
|
||
<accessibility>
|
||
<relation type="labelled-by" target="label6"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">7</property>
|
||
<property name="top-attach">1</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label1">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">8×8</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image1"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">0</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label2">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">16×16</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image2"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">1</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label3">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">18×18</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image3"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">2</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label4">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">24×24</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image4"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">3</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label5">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">32×32</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image5"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">4</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label6">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">48×48</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image6"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">5</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label7">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">64×64</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image7"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">6</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="label8">
|
||
<property name="halign">center</property>
|
||
<property name="valign">baseline</property>
|
||
<property name="label">scalable</property>
|
||
<style>
|
||
<class name="dim-label"/>
|
||
</style>
|
||
<accessibility>
|
||
<relation type="label-for" target="image8"/>
|
||
</accessibility>
|
||
<layout>
|
||
<property name="left-attach">7</property>
|
||
<property name="top-attach">2</property>
|
||
</layout>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkButton">
|
||
<property name="label" translatable="yes">Copy to Clipboard</property>
|
||
<property name="halign">center</property>
|
||
<property name="valign">center</property>
|
||
<property name="margin">20</property>
|
||
<signal name="clicked" handler="copy_to_clipboard"/>
|
||
</object>
|
||
</child>
|
||
<child>
|
||
<object class="GtkLabel" id="description">
|
||
<property name="margin">10</property>
|
||
<property name="wrap">1</property>
|
||
<property name="max-width-chars">60</property>
|
||
<property name="valign">start</property>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</child>
|
||
</object>
|
||
</interface>
|