errorDetails: Redesign the dialog a bit

Closes #378
This commit is contained in:
Sophie Herold 2024-07-19 21:33:49 +02:00
parent 21b501a9d9
commit 134c488dbd
3 changed files with 46 additions and 35 deletions

View file

@ -61,3 +61,8 @@ dialog.error-details textview {
.bottom-properties { .bottom-properties {
box-shadow: 0 -1px var(--headerbar-darker-shade-color); box-shadow: 0 -1px var(--headerbar-darker-shade-color);
} }
.error-message {
padding: 12px;
font-size: 0.95em;
}

View file

@ -98,3 +98,4 @@ impl LpErrorDetails {
obj obj
} }
} }

View file

@ -2,8 +2,8 @@
<interface> <interface>
<template class="LpErrorDetails" parent="AdwDialog"> <template class="LpErrorDetails" parent="AdwDialog">
<property name="title">Error Details</property> <property name="title">Error Details</property>
<property name="content-width">400</property> <property name="content-width">550</property>
<property name="content-height">450</property> <property name="content-height">600</property>
<style> <style>
<class name="error-details" /> <class name="error-details" />
</style> </style>
@ -13,29 +13,41 @@
<object class="AdwHeaderBar" /> <object class="AdwHeaderBar" />
</child> </child>
<property name="content"> <property name="content">
<object class="GtkBox"> <object class="AdwPreferencesPage">
<property name="orientation">vertical</property>
<property name="spacing">16px</property>
<property name="margin-top">12px</property>
<property name="margin-start">12px</property>
<property name="margin-end">12px</property>
<property name="margin-bottom">12px</property>
<child> <child>
<object class="GtkLabel"> <object class="AdwPreferencesGroup">
<property name="label" translatable="true">The image loader reported the following. Please include this information when you report an error.</property> <property name="description" translatable="true">The image loader reported the following when trying to load the image. Please include this information when you report an error. If possible, please also provide the image that causes the issue.</property>
<property name="wrap">true</property>
<style>
<class name="dim-label" />
</style>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkScrolledWindow"> <object class="AdwPreferencesGroup">
<property name="vexpand">true</property> <property name="title" translatable="true">Error Message</property>
<property name="header-suffix">
<object class="GtkButton" id="copy">
<property name="icon-name">edit-copy-symbolic</property>
<property name="tooltip-text" translatable="yes">Copy Error Message</property>
<style>
<class name="flat" />
</style>
</object>
</property>
<child> <child>
<object class="GtkTextView" id="message"> <object class="GtkScrolledWindow">
<property name="editable">false</property> <property name="vexpand">true</property>
<property name="wrap-mode">word-char</property> <property name="overflow">hidden</property>
<style>
<class name="card" />
</style>
<child>
<object class="GtkTextView" id="message">
<property name="editable">false</property>
<property name="wrap-mode">word-char</property>
<style>
<class name="error-message" />
<class name="monospace" />
</style>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
@ -43,21 +55,14 @@
</object> </object>
</property> </property>
<child type="bottom"> <child type="bottom">
<object class="GtkCenterBox"> <object class="GtkButton" id="report">
<property name="margin-top">12px</property> <property name="label" translatable="yes">Report Issue…</property>
<property name="margin-start">12px</property> <property name="halign">center</property>
<property name="margin-end">12px</property> <property name="margin-bottom">24</property>
<property name="margin-bottom">12px</property> <style>
<property name="start-widget"> <class name="suggested-action" />
<object class="GtkButton" id="copy"> <class name="pill" />
<property name="label" translatable="yes">Copy Information</property> </style>
</object>
</property>
<property name="end-widget">
<object class="GtkButton" id="report">
<property name="label" translatable="yes">Report Issue…</property>
</object>
</property>
</object> </object>
</child> </child>
</object> </object>