Last active
February 4, 2023 04:12
-
-
Save SkyzohKey/2f784daf4b5c5a731408bd8b691f1dab to your computer and use it in GitHub Desktop.
Revisions
-
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public void init_settings () { SettingsListBox settings = new SettingsListBox (); this.pack_start (settings, true, true, 0); settings.new_section ("Police"); Gtk.FontButton button_font = new Gtk.FontButton (); settings.new_row (button_font, -
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,41 +8,41 @@ ```vala public void init_settings () { SettingsListBox settings = new SettingsListBox (); this.pack_start (settings, true, true, 0); listbox.new_section ("Police"); Gtk.FontButton button_font = new Gtk.FontButton (); settings.new_row (button_font, "Police de caractères", "Utiliser une police de caractères personalisée." ); settings.new_section ("Vue d'ensemble"); Gtk.Switch switch_minimap = new Gtk.Switch (); settings.new_row (switch_minimap, "Afficher la vue d'ensemble", "Affiche une vue d'ensemble à côté de l'éditeur de code source." ); settings.new_section ("Indentation"); Gtk.SpinButton button_indent = new Gtk.SpinButton.with_range (0, 8, 2); settings.new_row (button_indent, "Largeur de tabulation", "Permet de définir la largeur d'une tabulation dans l'éditeur de code source." ); Gtk.Switch switch_indent_space = new Gtk.Switch (); settings.new_row (switch_indent_space, "Insérer des espaces au lieu de tabulations", "Insére 4 espaces à la place d'une tabulation." ); Gtk.Switch switch_auto_indent = new Gtk.Switch (); settings.new_row (switch_auto_indent, "Activer l'indentation automatique", "Formate automatiquement le texte pour l'indenter." ); -
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public class SettingsListBox: Gtk.Box { return box; } public Gtk.Box new_row (Gtk.Widget widget, string name, string? help = null) { Gtk.ListBoxRow row = new Gtk.ListBoxRow (); row.set_size_request (1, 50); this.listbox.add (row); -
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class SettingsListBox: Gtk.Box { hbox.pack_start (this.scrolled_box, true, true, 0); } public Gtk.Box new_section (string name) { Gtk.Box box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); this.scrolled_box.pack_start (box, false, false, 5); @@ -32,9 +32,11 @@ public class SettingsListBox: Gtk.Box { this.listbox = new Gtk.ListBox (); this.listbox.set_selection_mode (Gtk.SelectionMode.NONE); this.scrolled_box.pack_start (this.listbox, false, false, 0); return box; } public Gtk.Box new_row (Gtk.Widget widget, string name, string? help=null) { Gtk.ListBoxRow row = new Gtk.ListBoxRow (); row.set_size_request (1, 50); this.listbox.add (row); @@ -62,5 +64,7 @@ public class SettingsListBox: Gtk.Box { vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); vbox.set_center_widget (widget); box.pack_end (vbox, false, false, 0); return box; } } -
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public class SettingsListBox: Gtk.Box { this.scrolled_box.pack_start (box, false, false, 5); Gtk.Label label = new Gtk.Label (null); label.set_line_wrap (true); label.set_markup (@"<b>$name</b>"); label.set_margin_top (4); label.set_margin_start (6); @@ -46,6 +47,7 @@ public class SettingsListBox: Gtk.Box { box.pack_start (vbox, false, true, 0); Gtk.Label label = new Gtk.Label (name); label.set_line_wrap (true); label.set_xalign (0); vbox.pack_start (label, false, false, 0); -
SkyzohKey revised this gist
Feb 15, 2017 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ # SettingsListBox ### Screenshot  ### Example ```vala @@ -43,8 +47,4 @@ public void init_settings () { "Formate automatiquement le texte pour l'indenter." ); } ``` -
SkyzohKey revised this gist
Feb 15, 2017 . 2 changed files with 54 additions and 54 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,62 +3,62 @@ public class SettingsListBox: Gtk.Box { public Gtk.Box scrolled_box; public Gtk.ListBox listbox; public SettingsListBox () { this.set_orientation (Gtk.Orientation.HORIZONTAL); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow (null, null); scroll.set_size_request (400, 1); this.pack_start (scroll, true, true, 0); Gtk.Box hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); scroll.add (hbox); this.scrolled_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); this.scrolled_box.set_size_request (400, 1); hbox.pack_start (this.scrolled_box, true, true, 0); } public void new_section (string name) { Gtk.Box box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); this.scrolled_box.pack_start (box, false, false, 5); Gtk.Label label = new Gtk.Label (null); label.set_markup (@"<b>$name</b>"); label.set_margin_top (4); label.set_margin_start (6); box.pack_start (label, false, false, 2); this.listbox = new Gtk.ListBox (); this.listbox.set_selection_mode (Gtk.SelectionMode.NONE); this.scrolled_box.pack_start (this.listbox, false, false, 0); } public void new_row (Gtk.Widget widget, string name, string? help=null) { Gtk.ListBoxRow row = new Gtk.ListBoxRow (); row.set_size_request (1, 50); this.listbox.add (row); Gtk.Box box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); box.set_border_width (5); row.add (box); Gtk.Box vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); box.pack_start (vbox, false, true, 0); Gtk.Label label = new Gtk.Label (name); label.set_xalign (0); vbox.pack_start (label, false, false, 0); if (help != null) { label = new Gtk.Label (null); label.set_xalign (0); label.set_sensitive (false); label.set_markup (@"<small>$help</small>"); vbox.pack_start (label, false, false, 0); } vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); vbox.set_center_widget (widget); box.pack_end (vbox, false, false, 0); } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,41 +4,41 @@ ```vala public void init_settings () { SettingsListBox listbox = new SettingsListBox (); this.pack_start (listbox, true, true, 0); listbox.new_section ("Police"); Gtk.FontButton button_font = new Gtk.FontButton (); listbox.new_row (button_font, "Police de caractères", "Utiliser une police de caractères personalisée." ); listbox.new_section ("Vue d'ensemble"); Gtk.Switch switch_minimap = new Gtk.Switch (); listbox.new_row (switch_minimap, "Afficher la vue d'ensemble", "Affiche une vue d'ensemble à côté de l'éditeur de code source." ); listbox.new_section ("Indentation"); Gtk.SpinButton button_indent = new Gtk.SpinButton.with_range (0, 8, 2); listbox.new_row (button_indent, "Largeur de tabulation", "Permet de définir la largeur d'une tabulation dans l'éditeur de code source." ); Gtk.Switch switch_indent_space = new Gtk.Switch (); listbox.new_row (switch_indent_space, "Insérer des espaces au lieu de tabulations", "Insére 4 espaces à la place d'une tabulation." ); Gtk.Switch switch_auto_indent = new Gtk.Switch (); listbox.new_row (switch_auto_indent, "Activer l'indentation automatique", "Formate automatiquement le texte pour l'indenter." ); -
SkyzohKey created this gist
Feb 15, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ public class SettingsListBox: Gtk.Box { public Gtk.Box scrolled_box; public Gtk.ListBox listbox; public SettingsListBox() { this.set_orientation(Gtk.Orientation.HORIZONTAL); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow(null, null); scroll.set_size_request(400, 1); this.pack_start(scroll, true, true, 0); Gtk.Box hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); scroll.add(hbox); this.scrolled_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); this.scrolled_box.set_size_request(400, 1); hbox.pack_start (this.scrolled_box, true, true, 0); } public void new_section(string name) { Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); this.scrolled_box.pack_start(box, false, false, 5); Gtk.Label label = new Gtk.Label(null); label.set_markup(@"<b>$name</b>"); label.set_margin_top(4); label.set_margin_start(6); box.pack_start(label, false, false, 2); this.listbox = new Gtk.ListBox(); this.listbox.set_selection_mode(Gtk.SelectionMode.NONE); this.scrolled_box.pack_start(this.listbox, false, false, 0); } public void new_row(Gtk.Widget widget, string name, string? help=null) { Gtk.ListBoxRow row = new Gtk.ListBoxRow(); row.set_size_request(1, 50); this.listbox.add(row); Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); box.set_border_width(5); row.add(box); Gtk.Box vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); box.pack_start(vbox, false, true, 0); Gtk.Label label = new Gtk.Label(name); label.set_xalign(0); vbox.pack_start(label, false, false, 0); if (help != null) { label = new Gtk.Label(null); label.set_xalign(0); label.set_sensitive(false); label.set_markup(@"<small>$help</small>"); vbox.pack_start(label, false, false, 0); } vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); vbox.set_center_widget(widget); box.pack_end(vbox, false, false, 0); } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ # SettingsListBox ### Example ```vala public void init_settings () { SettingsListBox listbox = new SettingsListBox(); this.pack_start (listbox, true, true, 0); listbox.new_section("Police"); Gtk.FontButton button_font = new Gtk.FontButton(); listbox.new_row(button_font, "Police de caractères", "Utiliser une police de caractères personalisée." ); listbox.new_section("Vue d'ensemble"); Gtk.Switch switch_minimap = new Gtk.Switch(); listbox.new_row(switch_minimap, "Afficher la vue d'ensemble", "Affiche une vue d'ensemble à côté de l'éditeur de code source." ); listbox.new_section("Indentation"); Gtk.SpinButton button_indent = new Gtk.SpinButton.with_range(0, 8, 2); listbox.new_row(button_indent, "Largeur de tabulation", "Permet de définir la largeur d'une tabulation dans l'éditeur de code source." ); Gtk.Switch switch_indent_space = new Gtk.Switch(); listbox.new_row(switch_indent_space, "Insérer des espaces au lieu de tabulations", "Insére 4 espaces à la place d'une tabulation." ); Gtk.Switch switch_auto_indent = new Gtk.Switch(); listbox.new_row(switch_auto_indent, "Activer l'indentation automatique", "Formate automatiquement le texte pour l'indenter." ); } ``` ### Screenshot 