static void
gtk_inscription_get_layout_location (GtkInscription *self,
- int *x_out,
- int *y_out)
+ float *x_out,
+ float *y_out)
{
GtkWidget *widget = GTK_WIDGET (self);
const int widget_width = gtk_widget_get_width (widget);
PangoRectangle logical;
float xalign;
int baseline;
- int x, y;
+ float x, y;
g_assert (x_out);
g_assert (y_out);
{
GtkInscription *self = GTK_INSCRIPTION (widget);
GtkStyleContext *context;
- int lx, ly;
+ float lx, ly;
if (!self->text || (*self->text == '\0'))
return;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="default-width">200</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkOverlay">
+ <child>
+ <object class="GtkLabel" />
+ </child>
+ <child type="overlay">
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="ellipsize">start</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="default-width">200</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkInscription">
+ <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="text-overflow">clip</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkInscription">
+ <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="text-overflow">ellipsize-start</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkInscription">
+ <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="text-overflow">ellipsize-middle</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkInscription">
+ <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
+ <property name="text-overflow">ellipsize-end</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
'image-load-from-file.ui',
'inscription-markup.ref.ui',
'inscription-markup.ui',
+ 'inscription-overflow.ref.ui',
+ 'inscription-overflow.ui',
'label-attribute-preference.css',
'label-attribute-preference.ref.ui',
'label-attribute-preference.ui',