mirror of
https://gitlab.com/liyaowhen/youtubecollector-git.git
synced 2026-10-01 01:12:59 +00:00
further ui enhancements
This commit is contained in:
+2
-1
@@ -4,9 +4,10 @@ runtime=host
|
|||||||
toolchain=default
|
toolchain=default
|
||||||
config-opts=
|
config-opts=
|
||||||
run-opts=
|
run-opts=
|
||||||
prefix=/home/leow/.cache/gnome-builder/install/Song/host
|
prefix=/home/liyaowhen/.cache/gnome-builder/install/song/host
|
||||||
app-id=
|
app-id=
|
||||||
postbuild=
|
postbuild=
|
||||||
prebuild=
|
prebuild=
|
||||||
run-command=
|
run-command=
|
||||||
|
builddir=false
|
||||||
default=true
|
default=true
|
||||||
|
|||||||
Vendored
-16
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "lldb",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Debug",
|
|
||||||
"program": "${workspaceFolder}/<executable file>",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Vendored
-34
@@ -1,34 +0,0 @@
|
|||||||
[editor]
|
|
||||||
line_wrapping=false
|
|
||||||
line_break_column=72
|
|
||||||
auto_continue_multiline=true
|
|
||||||
|
|
||||||
[file_prefs]
|
|
||||||
final_new_line=true
|
|
||||||
ensure_convert_new_lines=false
|
|
||||||
strip_trailing_spaces=false
|
|
||||||
replace_tabs=false
|
|
||||||
|
|
||||||
[indentation]
|
|
||||||
indent_width=4
|
|
||||||
indent_type=1
|
|
||||||
indent_hard_tab_width=8
|
|
||||||
detect_indent=false
|
|
||||||
detect_indent_width=false
|
|
||||||
indent_mode=2
|
|
||||||
|
|
||||||
[project]
|
|
||||||
name=Song
|
|
||||||
base_path=/home/leow/Projects/Song
|
|
||||||
description=
|
|
||||||
|
|
||||||
[long line marker]
|
|
||||||
long_line_behaviour=1
|
|
||||||
long_line_column=72
|
|
||||||
|
|
||||||
[files]
|
|
||||||
current_page=0
|
|
||||||
FILE_NAME_0=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fleow%2F.local%2Fshare%2Fanime-game-launcher%2Fdebug.log;0;4
|
|
||||||
|
|
||||||
[VTE]
|
|
||||||
last_dir=/home/leow
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"sources" : [
|
"sources" : [
|
||||||
{
|
{
|
||||||
"type" : "git",
|
"type" : "git",
|
||||||
"url" : "file:///home/leow/Projects"
|
"url" : "file:///home/liyaowhen/Documents/Song"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -4,10 +4,13 @@
|
|||||||
# ninja -C builddir clean
|
# ninja -C builddir clean
|
||||||
|
|
||||||
# Set up Meson build directory
|
# Set up Meson build directory
|
||||||
meson setup builddir --buildtype=debug
|
meson setup build --buildtype=debug
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
ninja -C builddir
|
meson compile -C build
|
||||||
|
|
||||||
|
# Install project
|
||||||
|
meson install -C build
|
||||||
|
|
||||||
# Run the executable
|
# Run the executable
|
||||||
song
|
song
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14.24"><defs><style>.cls-1{fill:#2ec27e;}.cls-2{fill:#e01b24;}.cls-3{fill:#2e3436;}.cls-4{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="svg7384"><path class="cls-1" d="M11.85,4.19H8.92a2.15,2.15,0,0,0-2.1,2.15V9.46a2.48,2.48,0,0,0-1.08-.25,2.52,2.52,0,1,0,2.52,2.52V6.34A.7.7,0,0,1,9,5.62h2.88a.7.7,0,0,1,.71.72V9.46a2.44,2.44,0,0,0-1.07-.25A2.52,2.52,0,1,0,14,11.72V6.34A2.16,2.16,0,0,0,11.85,4.19Zm-5,7.54A1.07,1.07,0,0,1,5.74,12.8a1.08,1.08,0,1,1,1.08-1.08Zm4.67,1.07a1.08,1.08,0,1,1,1.07-1.08A1.06,1.06,0,0,1,11.49,12.8Z"/><path class="cls-2" d="M10.05,4.19v-2a.7.7,0,0,0-.72-.71H5a.7.7,0,0,0-.72.71V5.74A.7.7,0,0,0,5,6.46h4.3a.7.7,0,0,0,.72-.72V5.62h1.44v.12A2.18,2.18,0,0,1,9.33,7.9H5A2.17,2.17,0,0,1,2.87,5.74v-1L.46,7.21H0V.75H.49L2.87,3.22V2.15A2.17,2.17,0,0,1,5,0h4.3a2.17,2.17,0,0,1,2.16,2.15v2Z"/><path id="path4969" class="cls-3" d="M2.14,7.81V9.32A.18.18,0,0,1,2,9.5H.46v.84H2a.18.18,0,0,1,.17.17V12H3V10.51a.18.18,0,0,1,.18-.17H4.67V9.5H3.16A.18.18,0,0,1,3,9.32V7.81Z"/><path class="cls-4" d="M3,12.11H2.14A.09.09,0,0,1,2.05,12V10.51A.08.08,0,0,0,2,10.43H.46a.09.09,0,0,1-.09-.09V9.5a.09.09,0,0,1,.09-.09H2a.09.09,0,0,0,.08-.09V7.81a.09.09,0,0,1,.09-.09H3a.09.09,0,0,1,.09.09V9.32a.09.09,0,0,0,.08.09H4.67a.09.09,0,0,1,.09.09v.84a.09.09,0,0,1-.09.09H3.15a.08.08,0,0,0-.08.08V12A.09.09,0,0,1,3,12.11Zm-.75-.18h.66V10.51a.26.26,0,0,1,.26-.26H4.58V9.59H3.15a.27.27,0,0,1-.26-.27V7.9H2.23V9.32A.27.27,0,0,1,2,9.59H.55v.66H2a.26.26,0,0,1,.26.26Z"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7 1 c -2.054688 0 -3.703125 1.503906 -4.929688 2.984375 c -0.617187 0.742187 -1.125 1.507813 -1.488281 2.179687 c -0.183593 0.335938 -0.332031 0.648438 -0.441406 0.945313 c -0.1054688 0.292969 -0.1992188 0.535156 -0.1835938 0.929687 c 0.0273438 0.703126 0.2929688 1.160157 0.6601568 1.835938 c 0.367187 0.671875 0.867187 1.429688 1.476562 2.160156 c 1.210938 1.46875 2.824219 2.945313 4.851562 2.949219 l 5.054688 0.015625 c 2.195312 0.007812 4 -1.804688 4 -4 v -6 c 0 -2.195312 -1.804688 -4 -4 -4 z m 0 2 h 5 c 1.09375 0 2 0.90625 2 2 v 6 c 0 1.09375 -0.90625 2.003906 -2 2 l -5.050781 -0.015625 c -0.921875 0 -2.28125 -0.96875 -3.316407 -2.21875 c -0.519531 -0.628906 -0.960937 -1.296875 -1.257812 -1.851563 c -0.230469 -0.417968 -0.359375 -0.84375 -0.402344 -0.953124 c 0.007813 -0.039063 0.019532 -0.09375 0.042969 -0.15625 c 0.066406 -0.171876 0.175781 -0.414063 0.324219 -0.6875 c 0.296875 -0.546876 0.742187 -1.21875 1.269531 -1.851563 c 1.050781 -1.269531 2.445313 -2.265625 3.390625 -2.265625 z m 0.011719 2.015625 c -0.265625 0 -0.519531 0.101563 -0.707031 0.289063 c -0.390626 0.390624 -0.390626 1.027343 0 1.414062 l 1.289062 1.296875 l -1.289062 1.289063 c -0.390626 0.390624 -0.390626 1.027343 0 1.414062 c 0.386718 0.390625 1.023437 0.390625 1.414062 0 l 1.289062 -1.289062 l 1.292969 1.289062 c 0.390625 0.390625 1.027344 0.390625 1.417969 0 c 0.386719 -0.386719 0.386719 -1.023438 0 -1.414062 l -1.296875 -1.289063 l 1.296875 -1.296875 c 0.386719 -0.386719 0.386719 -1.023438 0 -1.414062 c -0.1875 -0.1875 -0.445312 -0.289063 -0.707031 -0.289063 c -0.265625 0 -0.523438 0.101563 -0.710938 0.289063 l -1.292969 1.296874 l -1.289062 -1.296874 c -0.1875 -0.1875 -0.445312 -0.289063 -0.710938 -0.289063 z m 0 0" fill="#222222"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -4,6 +4,8 @@
|
|||||||
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||||
<file preprocess="xml-stripblanks">icons/globe-alt2-symbolic.svg</file>
|
<file preprocess="xml-stripblanks">icons/globe-alt2-symbolic.svg</file>
|
||||||
<file preprocess="xml-stripblanks">icons/arrow-into-box-symbolic.svg</file>
|
<file preprocess="xml-stripblanks">icons/arrow-into-box-symbolic.svg</file>
|
||||||
|
<file preprocess="xml-stripblanks">icons/entry-clear-outline-symbolic.svg</file>
|
||||||
|
<file preprocess="xml-stripblanks">icons/add-video-or-song.svg</file>
|
||||||
<!--file>style.css</file!-->
|
<!--file>style.css</file!-->
|
||||||
</gresource>
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
|||||||
+28
-10
@@ -25,27 +25,45 @@ namespace Song {
|
|||||||
var collapse_button = new Gtk.Button.from_icon_name ("folder-symbolic");
|
var collapse_button = new Gtk.Button.from_icon_name ("folder-symbolic");
|
||||||
|
|
||||||
collapse_button.valign = Gtk.Align.CENTER;
|
collapse_button.valign = Gtk.Align.CENTER;
|
||||||
collapse_button_revealer.set_child(collapse_button);
|
|
||||||
collapse_button_revealer.transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT;
|
var add_button = new Gtk.Button();
|
||||||
|
var add_button_content = new Adw.ButtonContent ();
|
||||||
|
add_button_content.set_icon_name("applications-multimedia-symbolic");
|
||||||
|
add_button_content.set_label("Add Item");
|
||||||
|
add_button.set_child(add_button_content);
|
||||||
|
add_button.valign = Gtk.Align.CENTER;
|
||||||
|
|
||||||
|
add_button.clicked.connect(() => {
|
||||||
|
var popover = new NewMusicPopover();
|
||||||
|
popover.present(this);
|
||||||
|
});
|
||||||
|
|
||||||
var action_bar = new Adw.HeaderBar();
|
var action_bar = new Adw.HeaderBar();
|
||||||
action_bar.show_back_button = false;
|
action_bar.show_back_button = false;
|
||||||
action_bar.title_widget = new YtSearchBar();
|
action_bar.title_widget = new YtSearchBar();
|
||||||
action_bar.pack_start(collapse_button_revealer);
|
action_bar.pack_start(collapse_button);
|
||||||
|
action_bar.pack_start(add_button);
|
||||||
|
action_bar.margin_start = 5;
|
||||||
|
|
||||||
collapse_button.clicked.connect(() => {
|
collapse_button.clicked.connect(() => {
|
||||||
if(SongController.split_view.get_collapsed ()){
|
if(SongController.split_view.get_collapsed ()){
|
||||||
SongController.split_view.set_collapsed (false);
|
SongController.split_view.show_sidebar = false;
|
||||||
collapse_button_revealer.set_reveal_child(false);
|
collapse_button.visible = true;
|
||||||
} else {
|
} else {
|
||||||
SongController.split_view.set_collapsed(true);
|
SongController.split_view.show_sidebar = true;
|
||||||
action_bar.margin_start = -5;
|
collapse_button.visible = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Timeout.add(1, () => {
|
Timeout.add(1, () => {
|
||||||
if (SongController.side_bar != null) {
|
if (SongController.side_bar != null && SongController.split_view != null) {
|
||||||
|
if (SongController.split_view.get_show_sidebar()) {
|
||||||
|
collapse_button.visible = false;
|
||||||
|
} else collapse_button.visible = true;
|
||||||
SongController.side_bar.collapsing.connect(() => {
|
SongController.side_bar.collapsing.connect(() => {
|
||||||
collapse_button_revealer.set_reveal_child(true);
|
collapse_button.visible = true;
|
||||||
action_bar.margin_start = 5;
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Song {
|
|||||||
|
|
||||||
orientation = Gtk.Orientation.HORIZONTAL;
|
orientation = Gtk.Orientation.HORIZONTAL;
|
||||||
add_css_class("toolbar");
|
add_css_class("toolbar");
|
||||||
remove_button = new Gtk.Button.from_icon_name("app-remove-symbolic");
|
remove_button = new Gtk.Button.from_icon_name("entry-clear-outline-symbolic");
|
||||||
|
|
||||||
remove_button.clicked.connect(() => {
|
remove_button.clicked.connect(() => {
|
||||||
print("clicked");
|
print("clicked");
|
||||||
|
|||||||
@@ -23,21 +23,31 @@ namespace Song {
|
|||||||
|
|
||||||
var collapse_button = new Gtk.Button.from_icon_name ("folder-open-symbolic");
|
var collapse_button = new Gtk.Button.from_icon_name ("folder-open-symbolic");
|
||||||
collapse_button.clicked.connect(() => {
|
collapse_button.clicked.connect(() => {
|
||||||
if(SongController.split_view.get_collapsed ()){
|
if(SongController.split_view.get_show_sidebar()){
|
||||||
SongController.split_view.set_collapsed (false);
|
SongController.split_view.show_sidebar = false;
|
||||||
collapse_button.set_icon_name("folder-open-symbolic");
|
collapse_button.set_icon_name("folder-open-symbolic");
|
||||||
} else {
|
} else {
|
||||||
SongController.split_view.set_collapsed(true);
|
SongController.split_view.show_sidebar = true;
|
||||||
collapse_button.set_icon_name("folder-symbolic");
|
collapse_button.set_icon_name("folder-symbolic");
|
||||||
}
|
}
|
||||||
collapsing();
|
collapsing();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var add_button = new Gtk.Button.from_icon_name("bookmark-new-symbolic");
|
||||||
|
|
||||||
|
add_button.clicked.connect(() => {
|
||||||
|
var popover = new NewPlaylistPopover();
|
||||||
|
popover.present(this);
|
||||||
|
});
|
||||||
|
|
||||||
var header_bar = new Adw.HeaderBar();
|
var header_bar = new Adw.HeaderBar();
|
||||||
header_bar.margin_top = 5;
|
header_bar.margin_top = 5;
|
||||||
|
header_bar.margin_start = 5;
|
||||||
header_bar.show_title = false;
|
header_bar.show_title = false;
|
||||||
header_bar.show_start_title_buttons = false;
|
header_bar.show_start_title_buttons = false;
|
||||||
header_bar.show_end_title_buttons = false;
|
header_bar.show_end_title_buttons = false;
|
||||||
header_bar.pack_start(collapse_button);
|
header_bar.pack_start(collapse_button);
|
||||||
|
header_bar.pack_start(add_button);
|
||||||
|
|
||||||
var scroll_box = new Gtk.ScrolledWindow();
|
var scroll_box = new Gtk.ScrolledWindow();
|
||||||
scroll_box.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
scroll_box.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||||
|
|||||||
+3
-1
@@ -82,7 +82,7 @@ namespace Song {
|
|||||||
|
|
||||||
|
|
||||||
collapse_button.clicked.connect(() => {
|
collapse_button.clicked.connect(() => {
|
||||||
if(split_view.get_collapsed ()){
|
if(split_view.get_show_sidebar ()){
|
||||||
split_view.set_collapsed (false);
|
split_view.set_collapsed (false);
|
||||||
collapse_button.set_icon_name("folder-open-symbolic");
|
collapse_button.set_icon_name("folder-open-symbolic");
|
||||||
} else {
|
} else {
|
||||||
@@ -94,6 +94,8 @@ namespace Song {
|
|||||||
|
|
||||||
set_content(_content);
|
set_content(_content);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user