Make toolbar smaller

This commit is contained in:
daa84 2017-02-27 18:09:27 +03:00
parent 8fffd05905
commit fa31e8b0b0
2 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -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)",

View File

@ -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);