-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
namespace Atom { | ||
|
||
class Statusbar : Gtk.Box { | ||
static construct { | ||
set_css_name("statusbar"); | ||
} | ||
|
||
public Statusbar(Atom.TextEditorWidget text_editor_widget) { | ||
Object(orientation: Gtk.Orientation.HORIZONTAL, spacing: 2); | ||
|
||
var cursor_position_label = new Gtk.Label(null); | ||
text_editor_widget.bind_property("cursor-position", cursor_position_label, "label", BindingFlags.SYNC_CREATE); | ||
pack_start(pack(cursor_position_label), false); | ||
|
||
var grammar_label = new Gtk.Label(null); | ||
text_editor_widget.bind_property("grammar", grammar_label, "label", BindingFlags.SYNC_CREATE); | ||
pack_end(pack(grammar_label), false); | ||
|
||
var encoding_label = new Gtk.Label("UTF-8"); | ||
encoding_label.tooltip_text = "This file uses UTF-8 encoding"; | ||
pack_end(pack(encoding_label), false); | ||
} | ||
|
||
private static Gtk.Widget pack(Gtk.Widget child) { | ||
var frame = new Gtk.Frame(null); | ||
frame.shadow_type = Gtk.ShadowType.NONE; | ||
var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 4); | ||
box.margin = 4; | ||
box.margin_start = 11; | ||
box.margin_end = 11; | ||
box.add(child); | ||
frame.add(box); | ||
return frame; | ||
} | ||
} | ||
|
||
} |
This file contains 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 characters
Submodule atom-native
updated
18 files