Skip to content

Commit

Permalink
Use GLib.Action for buttons (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Apr 13, 2022
1 parent 0ed082f commit 0663a36
Show file tree
Hide file tree
Showing 2 changed files with 241 additions and 103 deletions.
5 changes: 1 addition & 4 deletions src/Button.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
public class PantheonCalculator.Button : Gtk.Button {
private const int WIDTH = 65;
private const int HEIGHT = 43;
public string function = null;

public Button (string label, string? description = null) {
function = label;
public Button (string label) {
var lbl = new Gtk.Label (label);
lbl.use_markup = true;
add (lbl);
tooltip_text = description;
}

public override void get_preferred_width (out int minimum_width, out int natural_width) {
Expand Down
Loading

0 comments on commit 0663a36

Please sign in to comment.