ui changes
This commit is contained in:
parent
1be42eb584
commit
eb26ca7418
|
@ -3,7 +3,7 @@
|
|||
<template class="MemoryCardsEditScene" parent="GtkApplicationWindow">
|
||||
<property name="title">Memory cards edit</property>
|
||||
<property name="height-request">1000</property>
|
||||
<property name="width-request">1000</property>
|
||||
<property name="width-request">200</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="content">
|
||||
<property name="orientation">vertical</property>
|
||||
|
@ -43,9 +43,7 @@
|
|||
<property name="orientation">vertical</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="hexpand-set">true</property>
|
||||
<property name="vexpand">true</property>
|
||||
<property name="vexpand-set">true</property>
|
||||
<property name="homogeneous">true</property>
|
||||
<!-- <property name="homogeneous">true</property> -->
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">GTK_ALIGN_FILL</property>
|
||||
<property name="valign">GTK_ALIGN_FILL</property>
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
<property name="width-request">512</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="content">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">GTK_ALIGN_CENTER</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
<child>
|
||||
<object class="GtkPicture" id="picture">
|
||||
<property name="halign">GTK_ALIGN_CENTER</property>
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="CardEntry" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<child>
|
||||
<object class="GtkPicture" id="picture">
|
||||
<property name="halign">GTK_ALIGN_START</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="hieroglyph_label">
|
||||
<property name="halign">GTK_ALIGN_START</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="reading_label">
|
||||
<property name="halign">GTK_ALIGN_START</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -24,6 +35,13 @@
|
|||
<property name="halign">GTK_ALIGN_END</property>
|
||||
<property name="valign">GTK_ALIGN_CENTER</property>
|
||||
<property name="label">delete</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="hexpand-set">true</property>
|
||||
<layout>
|
||||
<property name="column">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
|
|
|
@ -139,7 +139,6 @@ impl MemoryCardsEditScene {
|
|||
let connection = Connection::open(get_db_path()).unwrap();
|
||||
let imagepath = card.imagepath();
|
||||
let imagename = &Path::new(&imagepath).file_name().unwrap().to_str().unwrap();
|
||||
dbg!("removing {}", imagename);
|
||||
fs::remove_file(get_images_store_path() + "/" + &imagename).expect("Could not remove file!");
|
||||
connection.execute("DELETE FROM cards WHERE imagename = ?1", [&imagename]).unwrap();
|
||||
self_binding.imp().query_cards(None);
|
||||
|
|
Loading…
Reference in New Issue