print: Add libadwaita-rs features missing upstream
This should be reverted when porting to new release that supports those features. Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/240>
This commit is contained in:
parent
8dcf208d70
commit
ae23db6967
1 changed files with 23 additions and 0 deletions
|
|
@ -464,3 +464,26 @@ impl LpPrint {
|
|||
cairo_context.paint().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
trait AdwSpinRowExt {
|
||||
fn set_range(&self, min: f64, max: f64);
|
||||
}
|
||||
|
||||
use glib::translate::*;
|
||||
|
||||
impl AdwSpinRowExt for adw::SpinRow {
|
||||
fn set_range(&self, min: f64, max: f64) {
|
||||
unsafe {
|
||||
adw_spin_row_set_range(self.to_glib_none().0, min, max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "adwaita-1")]
|
||||
extern "C" {
|
||||
pub fn adw_spin_row_set_range(
|
||||
self_: *mut adw::ffi::AdwSpinRow,
|
||||
min: std::ffi::c_double,
|
||||
max: std::ffi::c_double,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue