Show user-visible error when no camera is available.

This commit is contained in:
Martijn Braam
2024-04-13 01:53:42 +02:00
parent b615d23de1
commit 421c4afdfa
3 changed files with 91 additions and 18 deletions

View File

@@ -110,6 +110,61 @@
</style>
</object>
</child>
<child type="overlay">
<object class="GtkBox" id="message-box">
<property name="orientation">vertical</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<property name="spacing">5</property>
<property name="can-focus">0</property>
<property name="visible">0</property>
<child>
<object class="GtkLabel" id="message-label">
<property name="label">Error happened</property>
<property name="vexpand">1</property>
<property name="hexpand">1</property>
<property name="valign">start</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="can-focus">0</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">0</property>
<property name="halign">start</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel">
<property name="label">Error</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="icon-name">dialog-warning-symbolic</property>
</object>
</child>
</object>
</child>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
<style>
<class name="error-overlay"/>
</style>
</object>
</child>
<child type="overlay">
<object class="GtkBox" id="bottom-box">
<property name="orientation">horizontal</property>