Make toolbar smaller
This commit is contained in:
parent
8fffd05905
commit
fa31e8b0b0
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1,6 +1,6 @@
|
||||
[root]
|
||||
name = "neovim-gtk"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"cairo-rs 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdk 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -8,7 +8,7 @@ use cairo::TextExtents;
|
||||
use cairo::enums::{FontWeight, FontSlant};
|
||||
use gtk;
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Window, WindowType, DrawingArea, Grid, ToolButton, ButtonBox, Orientation, Image};
|
||||
use gtk::{Window, WindowType, DrawingArea, Grid, ToolButton, Image, Toolbar, IconSize};
|
||||
use gdk::{ModifierType, Event, EventKey, EventConfigure, EventButton, EventMotion, EventType};
|
||||
use gdk_sys;
|
||||
use glib;
|
||||
@ -88,9 +88,9 @@ impl Ui {
|
||||
pub fn init(&mut self) {
|
||||
let grid = Grid::new();
|
||||
|
||||
let button_bar = ButtonBox::new(Orientation::Horizontal);
|
||||
let button_bar = Toolbar::new();
|
||||
button_bar.set_icon_size(IconSize::SmallToolbar);
|
||||
button_bar.set_hexpand(true);
|
||||
button_bar.set_layout(gtk::ButtonBoxStyle::Start);
|
||||
|
||||
let open_image = Image::new_from_icon_name("document-open", 50);
|
||||
let open_btn = ToolButton::new(Some(&open_image), None);
|
||||
|
Loading…
Reference in New Issue
Block a user