remove templates for app_library and cleanup window styling

This commit is contained in:
Ashley Wulber 2021-12-31 16:03:47 -05:00
parent 7c0cf048ee
commit 346701b16d
15 changed files with 185 additions and 256 deletions

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="SearchResultRow" parent="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">12</property>
<property name="margin-start">4</property>
<property name="margin-end">4</property>
<property name="hexpand">true</property>
<child>
<object class="GtkImage" id="categoryimage">
<property name="pixel-size">20</property>
</object>
</child>
<child>
<object class="GtkImage" id="image">
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="pixel-size">36</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="halign">fill</property>
<property name="hexpand">true</property>
<property name="margin-top">4</property>
<property name="margin-end">4</property>
<property name="margin-bottom">4</property>
<child>
<object class="GtkLabel" id="name">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="max-width-chars">40</property>
<style>
<class name="title-4"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="description">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="max-width-chars">50</property>
<style>
<class name="body"/>
</style>
</object>
</child>
</object>
</child>
<child type="end">
<object class="GtkLabel" id="shortcut">
<property name="halign">end</property>
<property name="wrap">false</property>
<style>
<class name="body"/>
</style>
</object>
</child>
</template>
</interface>

View file

@ -18,7 +18,7 @@ mod imp;
glib::wrapper! {
pub struct SearchResultRow(ObjectSubclass<imp::SearchResultRow>)
@extends gtk4::Widget, gtk4::Box,
@implements gtk4::Accessible, gtk4::Buildable, gtk4::ConstraintTarget, gtk4::Orientable;
@implements gtk4::Accessible, gtk4::Buildable, gtk4::ConstraintTarget, gtk4::Orientable;
}
impl Default for SearchResultRow {

View file

@ -19,6 +19,6 @@ box.container {
border-radius: 12px;
}
window {
window.root_window {
background: rgba(50, 50, 50, 0.0);
}

View file

@ -45,6 +45,7 @@ impl Window {
..set_title(Some("Cosmic Launcher"));
..set_decorated(false);
..set_resizable(false);
..add_css_class("root_window");
};
let container = cascade! {

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="LauncherWindow" parent="GtkApplicationWindow">
<property name="width-request">600</property>
<property name="title">Gtk Pop Launcher</property>
<property name="decorated">false</property>
<property name="resizable">false</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="GtkEntry" id="entry">
<property name="margin-bottom">12</property>
</object>
</child>
<child>
<object class="GtkListView" id="list_view"/>
</child>
</object>
</child>
</template>
</interface>