Skip to content

Commit 5e31581

Browse files
committed
fix background color picker
1 parent 672ebbe commit 5e31581

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MainWindow.vala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public class MainWindow : Gtk.Window {
133133

134134
fg_entry.icon_press.connect ((pos, event) => {
135135
if (pos == Gtk.EntryIconPosition.SECONDARY) {
136-
on_entry_icon_press (fg_entry.text);
136+
on_entry_icon_press (fg_entry);
137137
}
138138
});
139139

@@ -143,7 +143,7 @@ public class MainWindow : Gtk.Window {
143143

144144
bg_entry.icon_press.connect ((pos, event) => {
145145
if (pos == Gtk.EntryIconPosition.SECONDARY) {
146-
on_entry_icon_press (bg_entry.text);
146+
on_entry_icon_press (bg_entry);
147147
}
148148
});
149149

@@ -154,8 +154,8 @@ public class MainWindow : Gtk.Window {
154154
style_results_pane (fg_entry.text, bg_entry.text);
155155
}
156156

157-
private void on_entry_icon_press (string color_string) {
158-
gdk_color.parse (color_string);
157+
private void on_entry_icon_press (Gtk.Entry entry) {
158+
gdk_color.parse (entry.text);
159159

160160
var dialog = new Gtk.ColorSelectionDialog ("");
161161
dialog.deletable = false;
@@ -165,7 +165,7 @@ public class MainWindow : Gtk.Window {
165165
widget.current_rgba = gdk_color;
166166

167167
if (dialog.run () == Gtk.ResponseType.OK) {
168-
fg_entry.text = widget.current_rgba.to_string ();
168+
entry.text = widget.current_rgba.to_string ();
169169
}
170170
dialog.close ();
171171
}

0 commit comments

Comments
 (0)