ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
60.23k stars 3.94k forks source link

[issue]: GTK4+libadwaita UI #2743

Open vixalien opened 4 months ago

vixalien commented 4 months ago

Official FAQ

Ventoy Version

1.0.97

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

UEFI Mode

Partition Style

MBR

Disk Capacity

N/A

Disk Manufacturer

No response

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

The current UI is based on GTK3 and looks a bit dated. Perhaps a UI like the following mockup can be used for GTK4+libadwaita:

image

All options expanded:

image

UI file:

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <template class="VentoyWindow" parent="AdwWindow">
    <property name="title">Ventoy</property>
    <property name="width-request">390</property>
    <property name="height-request">294</property>
    <property name="default-width">390</property>
    <property name="default-height">600</property>
    <child>
      <object class="AdwBreakpoint">
        <condition>max-width:400sp</condition>
        <setter object="button_box" property="orientation">1</setter>
      </object>
    </child>
    <child>
      <object class="AdwToolbarView">
        <child type="top">
          <object class="AdwHeaderBar">
            <property name="title-widget">
              <object class="AdwBin"></object>
            </property>
          </object>
        </child>
        <child>
          <object class="AdwClamp">
            <child>
              <object class="AdwStatusPage">
                <property name="title">Ventoy</property>
                <property name="description">Install Ventoy to a device</property>
                <child>
                  <object class="GtkBox">
                    <property name="orientation">1</property>
                    <property name="spacing">12</property>
                    <child>
                      <object class="AdwPreferencesGroup">
                        <child>
                          <object class="AdwComboRow">
                            <property name="title">Device</property>
                            <property name="model">
                              <object class="GtkStringList"></object>
                            </property>
                            <child type="suffix">
                              <object class="GtkButton">
                                <property name="valign">3</property>
                                <property name="icon-name">refresh</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="AdwComboRow">
                            <property name="title">Language</property>
                            <property name="model">
                              <object class="GtkStringList"></object>
                            </property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="AdwPreferencesGroup">
                        <child>
                          <object class="AdwActionRow">
                            <property name="title">Ventoy in Package</property>
                            <property name="subtitle">v1.2.0</property>
                            <child type="suffix">
                              <object class="GtkImage">
                                <property name="icon-name">changes-prevent-symbolic</property>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="AdwActionRow">
                            <property name="title">Ventoy in Device</property>
                            <property name="subtitle">v1.2.0</property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkExpander">
                        <property name="label">Options</property>
                        <child>
                          <object class="AdwPreferencesGroup">
                            <property name="margin-top">12</property>
                            <child>
                              <object class="AdwSwitchRow">
                                <property name="title">Secure Boot Support</property>
                              </object>
                            </child>
                            <child>
                              <object class="AdwComboRow">
                                <property name="title">Partition Style</property>
                                <property name="model">
                                  <object class="GtkStringList">
                                    <items>
                                      <item>MBR</item>
                                      <item>GPT</item>
                                    </items>
                                  </object>
                                </property>
                              </object>
                            </child>
                            <child>
                              <object class="AdwExpanderRow">
                                <property name="title">Partition Configuration</property>
                                <child>
                                  <object class="AdwSwitchRow" id="preserve_switch_row">
                                    <property name="title">Preserve some space at end of disk</property>
                                  </object>
                                </child>
                                <child>
                                  <object class="AdwEntryRow">
                                    <property name="title">Space to preserve at end of disk</property>
                                    <property name="visible" bind-source="preserve_switch_row" bind-property="active" bind-flags="sync-create"/>
                                    <property name="text">0</property>
                                    <child type="suffix">
                                      <object class="GtkDropDown">
                                        <property name="valign">3</property>
                                        <style>
                                          <class name="flat"/>
                                        </style>
                                        <property name="model">
                                          <object class="GtkStringList">
                                            <items>
                                              <item>GB</item>
                                              <item>MB</item>
                                            </items>
                                          </object>
                                        </property>
                                      </object>
                                    </child>
                                  </object>
                                </child>
                                <child>
                                  <object class="AdwSwitchRow">
                                    <property name="title">Align partitions with 4KB</property>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="AdwSwitchRow">
                                <property name="title">Show all devices</property>
                              </object>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkBox" id="button_box">
                        <property name="orientation">0</property>
                        <property name="halign">3</property>
                        <property name="spacing">6</property>
                        <property name="margin-top">24</property>
                        <child>
                          <object class="GtkButton">
                            <property name="label">Install</property>
                            <property name="visible">false</property>
                            <style>
                              <class name="pill"/>
                              <class name="suggested-action"/>
                            </style>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton">
                            <property name="label">Update</property>
                            <style>
                              <class name="pill"/>
                            </style>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton">
                            <property name="label">Uninstall</property>
                            <style>
                              <class name="pill"/>
                              <class name="destructive-action"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
stavpup commented 1 month ago

Some people would prefer a switch to QT though

vixalien commented 1 month ago

You're right. Whatever suits people ig..

On Sun, 12 May 2024, 11:02 stavpup, @.***> wrote:

Some people would prefer a switch to QT though

— Reply to this email directly, view it on GitHub https://github.com/ventoy/Ventoy/issues/2743#issuecomment-2106173917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB5FCNP3TBHCWHXTO4V323ZB4VY5AVCNFSM6AAAAABDFT5NECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGE3TGOJRG4 . You are receiving this because you authored the thread.Message ID: @.***>