forked from AuroraMiddleware/gtk
label: Respect box-shadow when computing clip
Testclase included. Also reorder headers to be alphabetic.
This commit is contained in:
parent
b5a8b7ef3b
commit
1126a34353
@ -30,28 +30,28 @@
|
|||||||
#include "gtklabel.h"
|
#include "gtklabel.h"
|
||||||
#include "gtklabelprivate.h"
|
#include "gtklabelprivate.h"
|
||||||
#include "gtkaccellabel.h"
|
#include "gtkaccellabel.h"
|
||||||
|
#include "gtkbindings.h"
|
||||||
|
#include "gtkbuildable.h"
|
||||||
|
#include "gtkclipboard.h"
|
||||||
#include "gtkcssshadowsvalueprivate.h"
|
#include "gtkcssshadowsvalueprivate.h"
|
||||||
#include "gtkdnd.h"
|
#include "gtkdnd.h"
|
||||||
#include "gtkmarshalers.h"
|
#include "gtkimage.h"
|
||||||
#include "gtkpango.h"
|
|
||||||
#include "gtkwindow.h"
|
|
||||||
#include "gtkclipboard.h"
|
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
#include "gtkseparatormenuitem.h"
|
|
||||||
#include "gtktextutil.h"
|
|
||||||
#include "gtkmain.h"
|
#include "gtkmain.h"
|
||||||
|
#include "gtkmarshalers.h"
|
||||||
#include "gtkmenuitem.h"
|
#include "gtkmenuitem.h"
|
||||||
#include "gtkmenushellprivate.h"
|
#include "gtkmenushellprivate.h"
|
||||||
#include "gtknotebook.h"
|
#include "gtknotebook.h"
|
||||||
#include "gtkbindings.h"
|
#include "gtkpango.h"
|
||||||
#include "gtkbuildable.h"
|
#include "gtkprivate.h"
|
||||||
#include "gtkimage.h"
|
#include "gtkseparatormenuitem.h"
|
||||||
#include "gtkshow.h"
|
#include "gtkshow.h"
|
||||||
#include "gtkstylecontextprivate.h"
|
#include "gtkstylecontextprivate.h"
|
||||||
|
#include "gtktextutil.h"
|
||||||
#include "gtktooltip.h"
|
#include "gtktooltip.h"
|
||||||
#include "gtkprivate.h"
|
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
#include "gtkmain.h"
|
#include "gtkwidgetprivate.h"
|
||||||
|
#include "gtkwindow.h"
|
||||||
|
|
||||||
#include "a11y/gtklabelaccessibleprivate.h"
|
#include "a11y/gtklabelaccessibleprivate.h"
|
||||||
|
|
||||||
@ -3997,7 +3997,7 @@ gtk_label_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_label_get_ink_rect (label, &clip_rect);
|
gtk_label_get_ink_rect (label, &clip_rect);
|
||||||
gdk_rectangle_union (&clip_rect, allocation, &clip_rect);
|
gdk_rectangle_union (&clip_rect, allocation, &clip_rect);
|
||||||
gtk_widget_set_clip (widget, &clip_rect);
|
_gtk_widget_set_simple_clip (widget, &clip_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -252,6 +252,9 @@ testdata = \
|
|||||||
label-background.css \
|
label-background.css \
|
||||||
label-background.ref.ui \
|
label-background.ref.ui \
|
||||||
label-background.ui \
|
label-background.ui \
|
||||||
|
label-box-shadow-clip.css \
|
||||||
|
label-box-shadow-clip.ref.ui \
|
||||||
|
label-box-shadow-clip.ui \
|
||||||
label-clipping.css \
|
label-clipping.css \
|
||||||
label-clipping.ref.ui \
|
label-clipping.ref.ui \
|
||||||
label-clipping.ui \
|
label-clipping.ui \
|
||||||
|
9
testsuite/reftests/label-box-shadow-clip.css
Normal file
9
testsuite/reftests/label-box-shadow-clip.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import "reset-to-defaults.css";
|
||||||
|
|
||||||
|
.test {
|
||||||
|
box-shadow: 0 0 0 1px red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reference {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
23
testsuite/reftests/label-box-shadow-clip.ref.ui
Normal file
23
testsuite/reftests/label-box-shadow-clip.ref.ui
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.18.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.12"/>
|
||||||
|
<object class="GtkWindow" id="window1">
|
||||||
|
<property name="width_request">100</property>
|
||||||
|
<property name="height_request">100</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="type">popup</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="label" translatable="yes">X</property>
|
||||||
|
<style>
|
||||||
|
<class name="reference"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
23
testsuite/reftests/label-box-shadow-clip.ui
Normal file
23
testsuite/reftests/label-box-shadow-clip.ui
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.18.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.12"/>
|
||||||
|
<object class="GtkWindow" id="window1">
|
||||||
|
<property name="width_request">100</property>
|
||||||
|
<property name="height_request">100</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="type">popup</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="label" translatable="yes">X</property>
|
||||||
|
<style>
|
||||||
|
<class name="test"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
Reference in New Issue
Block a user