parent
8a6e4ebb88
commit
c9e7f052e1
3 changed files with 17 additions and 6 deletions
|
|
@ -891,6 +891,10 @@ impl LpImageView {
|
|||
self.imp().zoom_menu_button.clone()
|
||||
}
|
||||
|
||||
pub fn zoom_toggle(&self) -> gtk::ToggleButton {
|
||||
self.imp().zoom_toggle.clone()
|
||||
}
|
||||
|
||||
pub fn zoom_value_f64(&self) -> Option<f64> {
|
||||
let mut value = self.imp().zoom_value.text().to_string();
|
||||
let locale_settings = util::locale_settings();
|
||||
|
|
|
|||
|
|
@ -757,6 +757,12 @@ impl LpImageWindow {
|
|||
.is_some_and(|image| !image.is_best_fit()),
|
||||
);
|
||||
|
||||
self.image_view().zoom_toggle().set_sensitive(enabled_shown);
|
||||
|
||||
self.image_view()
|
||||
.zoom_menu_button()
|
||||
.set_sensitive(enabled_shown);
|
||||
|
||||
// Actions that are available if there is an current image, even if it's not
|
||||
// shown
|
||||
const ACTIONS_CURRENT: &[Action] = &[
|
||||
|
|
@ -774,7 +780,8 @@ impl LpImageWindow {
|
|||
}
|
||||
|
||||
// Editing related actions
|
||||
let enable_editing = self
|
||||
let enable_editing = enabled_shown
|
||||
&& self
|
||||
.imp()
|
||||
.image_view
|
||||
.current_image()
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="edit_button">
|
||||
<object class="GtkButton">
|
||||
<property name="action-name">win.edit</property>
|
||||
<property name="icon-name">crop-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Edit Image</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue