Skip to content

Commit

Permalink
Merge pull request #37 from Q1CHENL/fix/hex-copy
Browse files Browse the repository at this point in the history
Fix: hex copy
  • Loading branch information
lainsce authored Dec 4, 2023
2 parents d995c9c + ebd300b commit ff125b9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,16 @@ namespace Colorway {
string export_txt = "";

export_txt += box.hex + "\n";

switch (color_rule_dropdown.get_selected ()) {
case 2:
export_txt += sbox.hex + "\n";
break;
default:
export_txt += tbox.hex + "\n";
break;
export_txt += sbox.hex + "\n";

uint selected = color_rule_dropdown.get_selected ();
if (selected == 2) {
export_txt += tbox.hex + "\n";
} else if (selected >= 3) {
export_txt += tbox.hex + "\n";
export_txt += ubox.hex + "\n";
}

export_txt += ubox.hex + "\n";

// Put this ext_txt in clipboard
var display = Gdk.Display.get_default ();
unowned var clipboard = display.get_clipboard ();
Expand Down Expand Up @@ -572,4 +570,4 @@ namespace Colorway {
about.present ();
}
}
}
}

0 comments on commit ff125b9

Please sign in to comment.