revert X Property change, and cleanup formatting
This commit is contained in:
parent
5a4a802751
commit
65f43a9300
32 changed files with 459 additions and 429 deletions
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GridItem" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="margin-top">4</property>
|
||||
<property name="margin-start">4</property>
|
||||
<property name="margin-end">4</property>
|
||||
<property name="margin-bottom">4</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image">
|
||||
<property name="margin-top">4</property>
|
||||
<property name="margin-bottom">4</property>
|
||||
<property name="pixel-size">64</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name">
|
||||
<template class="GridItem" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<style>
|
||||
<class name="title-5" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="margin-top">4</property>
|
||||
<property name="margin-start">4</property>
|
||||
<property name="margin-end">4</property>
|
||||
<property name="margin-bottom">4</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image">
|
||||
<property name="margin-top">4</property>
|
||||
<property name="margin-bottom">4</property>
|
||||
<property name="pixel-size">64</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name">
|
||||
<property name="halign">center</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<style>
|
||||
<class name="title-5"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use std::cell::Cell;
|
||||
|
||||
use gtk4 as gtk;
|
||||
use gtk::CompositeTemplate;
|
||||
use gtk::glib;
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk4 as gtk;
|
||||
use std::cell::Cell;
|
||||
|
||||
use gtk::CompositeTemplate;
|
||||
|
||||
#[derive(Debug, Default, CompositeTemplate)]
|
||||
#[template(file = "grid_item.ui")]
|
||||
|
|
@ -32,5 +32,7 @@ impl ObjectSubclass for GridItem {
|
|||
}
|
||||
|
||||
impl ObjectImpl for GridItem {}
|
||||
|
||||
impl WidgetImpl for GridItem {}
|
||||
|
||||
impl BoxImpl for GridItem {}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
use crate::app_group::AppGroup;
|
||||
use gdk4::ContentProvider;
|
||||
use gdk4::Display;
|
||||
use gio::File;
|
||||
use gio::Icon;
|
||||
use gtk::{gio, glib};
|
||||
use gtk4 as gtk;
|
||||
use gtk4::traits::WidgetExt;
|
||||
use gtk4::DragSource;
|
||||
use gtk4::IconTheme;
|
||||
mod imp;
|
||||
|
||||
use gtk4::traits::WidgetExt;
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{gio, glib};
|
||||
|
||||
use crate::app_group::AppGroup;
|
||||
|
||||
mod imp;
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct GridItem(ObjectSubclass<imp::GridItem>)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue