Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose key view #28

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some mocking
cassidyjames committed Mar 9, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 24b2476419f229ffd38adcab93a5cc3ec675de8e
48 changes: 48 additions & 0 deletions src/Views/ComposeView.vala
Original file line number Diff line number Diff line change
@@ -15,12 +15,60 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Characters to include:
//
// Typographic Glyphs
// Em dash
// En dash
// Quotes
// Arrows
// Accented characters
// Mathematical
// Times
// Division
// Fractions
// Exponents

public class ShortcutOverlay.ComposeView : Gtk.Grid {
private const string SCHEMA_INPUT_SOURCES = "org.gnome.desktop.input-sources";

construct {
column_spacing = 24;
margin = 12;
margin_bottom = 32;

var grid = new Gtk.Grid ();
grid.column_spacing = 12;

var instructions = new Gtk.Label (_("Tap the <b>Right Alt</b> key, then the keys listed to insert special characters."));
instructions.use_markup = true;
instructions.halign = Gtk.Align.CENTER;

var name_label = new Gtk.Label (_("Em Dash (—):"));
name_label.halign = Gtk.Align.END;
name_label.xalign = 1;

var key_grid = new Gtk.Grid ();
key_grid.orientation = Gtk.Orientation.HORIZONTAL;
key_grid.column_spacing = 6;

var key1_label = new Gtk.Label ("-");
key1_label.get_style_context ().add_class ("keycap");

var key2_label = new Gtk.Label ("-");
key2_label.get_style_context ().add_class ("keycap");

var key3_label = new Gtk.Label ("-");
key3_label.get_style_context ().add_class ("keycap");

key_grid.add (key1_label);
key_grid.add (key2_label);
key_grid.add (key3_label);

grid.attach (instructions, 0, 0, 2, 1);
grid.attach (name_label, 0, 1, 1, 1);
grid.attach (key_grid, 1, 1, 1, 1);

add (grid);
}
}