Add switch to enable cards

This commit is contained in:
2024-04-18 14:14:19 +03:00
parent d0d2aaeb60
commit 9fa5524c9d
13 changed files with 139 additions and 50 deletions

View File

@@ -7,22 +7,22 @@
<property name="orientation">vertical</property>
<child>
<object class="LabledSwitch" id="hiragana_enable">
<property name="label_text">Enable hiragana?</property>
<property name="label">Enable hiragana?</property>
</object>
</child>
<child>
<object class="LabledSwitch" id="katakana_enable">
<property name="label_text">Enable katakana?</property>
<property name="label">Enable katakana?</property>
</object>
</child>
<child>
<object class="LabledSwitch" id="ktr_enable">
<property name="label_text">Enable kana to romaji?</property>
<property name="label">Enable kana to romaji?</property>
</object>
</child>
<child>
<object class="LabledSwitch" id="rtk_enable">
<property name="label_text">Enable romaji to kana?</property>
<property name="label">Enable romaji to kana?</property>
</object>
</child>
<child>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="CardEntry" parent="GtkWidget">
<!-- <property name="is_learning">false</property> -->
<child>
<object class="GtkImage" id="image">
<property name="halign">GTK_ALIGN_START</property>
@@ -18,6 +19,13 @@
<property name="margin-start">50</property>
</object>
</child>
<child>
<object class="GtkLabel" id="reading_label">
<property name="halign">GTK_ALIGN_START</property>
<property name="valign">GTK_ALIGN_CENTER</property>
<property name="margin-start">50</property>
</object>
</child>
<child>
<object class="GtkLabel" id="translation_label">
<property name="halign">GTK_ALIGN_START</property>
@@ -25,6 +33,14 @@
<property name="margin-end">50</property>
<property name="hexpand-set">true</property>
<property name="hexpand">true</property>
<property name="width-chars">16</property>
<property name="max-width-chars">16</property>
<property name="wrap">true</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="is_learning_switch">
<property name="valign">GTK_ALIGN_CENTER</property>
</object>
</child>
<child>

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="LabledSwitch" parent="GtkWidget">
<property name="label_text">placeholder</property>
<child>
<object class="GtkSwitch" id="switch_obj">
</object>