[gtk+/gtk-3-22] widget-factory: Demo different Frame border-styles
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] widget-factory: Demo different Frame border-styles
- Date: Mon, 2 Oct 2017 19:26:07 +0000 (UTC)
commit 66767adc63dd919504135c04dcbfe57737bac93b
Author: Daniel Boles <dboles src gnome org>
Date: Mon Oct 2 20:22:33 2017 +0100
widget-factory: Demo different Frame border-styles
This shows not all, but the interesting/less predictable styles, and
the ones that correspond to the :shadow-types that were here before.
demos/widget-factory/widget-factory.css | 22 ++++++++++++++++++++++
demos/widget-factory/widget-factory.ui | 23 ++++++++++++++++-------
2 files changed, 38 insertions(+), 7 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.css b/demos/widget-factory/widget-factory.css
index 1782e6d..1b72266 100644
--- a/demos/widget-factory/widget-factory.css
+++ b/demos/widget-factory/widget-factory.css
@@ -2,3 +2,25 @@
padding: 0;
outline-width: 0;
}
+
+frame.border-inset > border {
+ border-style: inset;
+}
+
+frame.border-outset > border {
+ border-style: outset;
+}
+
+frame.border-groove > border {
+ border-style: groove;
+}
+
+frame.border-ridge > border {
+ border-style: ridge;
+}
+
+/* These effects use 2 lines, so show them */
+frame.border-groove > border,
+frame.border-ridge > border {
+ border-width: 2px;
+}
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 5fcf9b5..2d7426f 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -1301,11 +1301,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">1</property>
- <property name="shadow_type">in</property>
+ <style>
+ <class name="border-inset"/>
+ </style>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">1</property>
- <property name="label" translatable="yes"><b>In</b></property>
+ <property name="label" translatable="yes"><b>Inset</b></property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1317,11 +1319,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">1</property>
- <property name="shadow_type">out</property>
+ <style>
+ <class name="border-outset"/>
+ </style>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">1</property>
- <property name="label" translatable="yes"><b>Out</b></property>
+ <property name="label"
translatable="yes"><b>Outset</b></property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1334,10 +1338,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">1</property>
+ <style>
+ <class name="border-groove"/>
+ </style>
<child type="label">
<object class="GtkLabel" id="label17">
<property name="visible">1</property>
- <property name="label" translatable="yes"><b>Etched
in</b></property>
+ <property name="label"
translatable="yes"><b>Groove</b></property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1350,11 +1357,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">1</property>
- <property name="shadow_type">etched-out</property>
+ <style>
+ <class name="border-ridge"/>
+ </style>
<child type="label">
<object class="GtkLabel" id="label18">
<property name="visible">1</property>
- <property name="label" translatable="yes"><b>Etched
out</b></property>
+ <property name="label" translatable="yes"><b>Ridge</b></property>
<property name="use_markup">1</property>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]