summaryrefslogtreecommitdiffstats
path: root/src/gs-screenshot-carousel.ui
blob: acffc9154c3725139976cbfc819e4d020802c28e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk+" version="3.10"/>
  <requires lib="handy" version="1.0"/>
  <template class="GsScreenshotCarousel" parent="GtkWidget">
    <property name="visible">False</property>
    <child>
      <object class="GtkStack" id="stack">

        <child>
          <object class="GtkStackPage">
            <property name="name">carousel</property>
            <property name="child">
              <object class="GtkBox">
                <property name="orientation">vertical</property>
                <style>
                  <class name="frame"/>
                  <class name="view"/>
                </style>
                <child>
                  <object class="GtkOverlay">
                    <child>
                      <object class="AdwCarousel" id="carousel">
                        <property name="vexpand">True</property>
                        <signal name="notify::n-pages" handler="gs_screenshot_carousel_notify_n_pages_cb" swapped="yes"/>
                        <signal name="notify::position" handler="gs_screenshot_carousel_notify_position_cb" swapped="yes"/>
                      </object>
                    </child>
                    <child type="overlay">
                      <object class="GtkRevealer" id="button_previous_revealer">
                        <property name="halign">start</property>
                        <property name="transition-type">crossfade</property>
                        <property name="valign">center</property>
                        <child>
                          <object class="GtkButton" id="button_previous">
                            <property name="width-request">64</property>
                            <property name="height-request">64</property>
                            <property name="margin-top">9</property>
                            <property name="margin-bottom">9</property>
                            <property name="margin-start">9</property>
                            <property name="margin-end">9</property>
                            <property name="icon-name">go-previous-symbolic</property>
                            <signal name="clicked" handler="gs_screenshot_carousel_button_previous_clicked_cb" swapped="yes"/>
                            <accessibility>
                              <!-- Translators: This is the accessible description for a button to go to the previous screenshot in the screenshot carousel. -->
                              <property name="label" translatable="yes">Previous Screenshot</property>
                            </accessibility>
                            <style>
                              <class name="circular"/>
                              <class name="image-button"/>
                              <class name="osd"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child type="overlay">
                      <object class="GtkRevealer" id="button_next_revealer">
                        <property name="halign">end</property>
                        <property name="transition-type">crossfade</property>
                        <property name="valign">center</property>
                        <child>
                          <object class="GtkButton" id="button_next">
                            <property name="width-request">64</property>
                            <property name="height-request">64</property>
                            <property name="margin-top">9</property>
                            <property name="margin-bottom">9</property>
                            <property name="margin-start">9</property>
                            <property name="margin-end">9</property>
                            <property name="icon-name">go-next-symbolic</property>
                            <signal name="clicked" handler="gs_screenshot_carousel_button_next_clicked_cb" swapped="yes"/>
                            <accessibility>
                              <!-- Translators: This is the accessible description for a button to go to the next screenshot in the screenshot carousel. -->
                              <property name="label" translatable="yes">Next Screenshot</property>
                            </accessibility>
                            <style>
                              <class name="circular"/>
                              <class name="image-button"/>
                              <class name="osd"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwCarouselIndicatorDots" id="carousel_indicator">
                    <property name="carousel">carousel</property>
                  </object>
                </child>
              </object>
            </property>
          </object>
        </child>

        <child>
          <object class="GtkStackPage">
            <property name="name">fallback</property>
            <property name="child">
              <object class="GtkBox">
                <property name="orientation">vertical</property>
                <property name="spacing">6</property>
                <!-- Arbitrary size chosen to tile together at 16:9;
                     see https://blogs.gnome.org/hughsie/2014/07/02/blurry-screenshots-in-gnome-software/ -->
                <property name="height_request">423</property>
                <property name="hexpand">True</property>
                <property name="halign">fill</property>
                <style>
                  <class name="screenshot-image"/>
                  <class name="frame"/>
                  <class name="view"/>
                </style>
                <child>
                  <object class="GtkImage">
                    <property name="pixel_size">64</property>
                    <property name="icon_name">camera-photo-symbolic</property>
                    <property name="valign">end</property>
                    <property name="vexpand">True</property>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="halign">center</property>
                    <property name="valign">start</property>
                    <property name="vexpand">True</property>
                    <property name="label" translatable="yes">No screenshot provided</property>
                  </object>
                </child>
              </object>

            </property>
          </object>
        </child>

      </object>
    </child>
  </template>
</interface>