Give an example of the XML defining a GTK window for a To-Do list application. The UI…
- User
Give an example of the XML defining a GTK window for a To-Do list application. The UI design should follow Gnome's design guidelines.
- Assistant
Here's an example of XML code defining a GTK window for a To-Do list application that follows Gnome's design guidelines:
xml<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE interface PUBLIC "-//GNOME//DTD Gtk 3.0//EN" "http://developer.gnome.org/dtd/3.0/gtk.dtd"> <interface> <object class="GtkWindow" id="main-window"> <property name="title">To-Do List</property> <property name="default-width">600</property> <property name="default-height">400</property> <child> <object class="GtkBox" id="main-box"> <property name="orientation">vertical</property> <child> <object class="GtkEntry" id="new-item-entry"> <property name="hexpand">true</property> <property name="placeholder-text">Add a new item</property> </object> </child> <child> <object class="GtkScrolledWindow" id="item-list-scroll"> <property name="hexpand">true</property> <property name="vexpand">true</property> <child> <object class="GtkListBox" id="item-list"> <property name="selection-mode">none</property> </object> </child> </object> </child> <child> <object class="GtkButtonBox" id="button-box"> <property name="layout-style">spread</property> <property name="halign">end</property> <child> <object class="GtkButton" id="add-button"> <property name="label">Add</property> </object> </child> <child> <object class="GtkButton" id="delete-button"> <property name="label">Delete</property> <property name="sensitive">false</property> </object> </child> </object> </child> </object> </child> </object> </interface>In this example, the XML code defines a GTK window with a vertical box layout containing three child elements: an entry box for adding new items, a scrolled window containing a list box of items, and a button box containing "Add" and "Delete" buttons. The code also sets properties for various elements, such as the window title, default size, and button labels. The design follows Gnome's guidelines for spacing, alignment, and layout style.
- User
Thanks
- Assistant
No problem!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →