Always center Windows and fix(probably) settings icon (#323)
This commit is contained in:
parent
4fc8655272
commit
b54748920f
2
.github/workflows/quality.yml
vendored
2
.github/workflows/quality.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
override: true
|
||||
|
||||
- name: Install Gtk
|
||||
run: sudo apt install -y libgtk-3-dev libasound2-dev
|
||||
run: sudo apt-get update; sudo apt install -y libgtk-3-dev libasound2-dev
|
||||
|
||||
- name: Check the format
|
||||
run: cargo fmt --all -- --check
|
||||
|
|
|
@ -2257,7 +2257,7 @@ This program is free to use and will always be.
|
|||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">settings-app-symbolic</property>
|
||||
<property name="icon-name">applications-engineering</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -7,8 +7,7 @@ pub fn connect_button_about(gui_data: &GuiData) {
|
|||
let about_dialog = gui_data.about.about_dialog.clone();
|
||||
let button_app_info = gui_data.header.button_app_info.clone();
|
||||
button_app_info.connect_clicked(move |_| {
|
||||
about_dialog.set_position(WindowPosition::Center); // Not working
|
||||
|
||||
about_dialog.set_position(WindowPosition::CenterAlways);
|
||||
about_dialog.show();
|
||||
let response = about_dialog.run();
|
||||
if response != ResponseType::None {
|
||||
|
|
|
@ -2,6 +2,7 @@ extern crate gtk;
|
|||
use crate::gui_data::GuiData;
|
||||
use crate::saving_loading::{load_configuration, reset_configuration, save_configuration};
|
||||
use gtk::prelude::*;
|
||||
use gtk::WindowPosition;
|
||||
|
||||
pub fn connect_settings(gui_data: &GuiData) {
|
||||
// Connect button settings
|
||||
|
@ -12,6 +13,7 @@ pub fn connect_settings(gui_data: &GuiData) {
|
|||
button_settings.connect_clicked(move |_| {
|
||||
window_main.set_sensitive(false);
|
||||
window_settings.show();
|
||||
window_settings.set_position(WindowPosition::CenterAlways);
|
||||
});
|
||||
|
||||
let window_main = gui_data.window_main.clone();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use gtk::prelude::*;
|
||||
use gtk::WindowPosition;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct GuiAbout {
|
||||
|
@ -12,6 +13,7 @@ pub struct GuiAbout {
|
|||
impl GuiAbout {
|
||||
pub fn create_from_builder(builder: >k::Builder) -> Self {
|
||||
let about_dialog: gtk::AboutDialog = builder.get_object("about_dialog").unwrap();
|
||||
about_dialog.set_position(WindowPosition::CenterAlways);
|
||||
|
||||
let button_repository: gtk::Button = builder.get_object("button_repository").unwrap();
|
||||
let button_donation: gtk::Button = builder.get_object("button_donation").unwrap();
|
||||
|
|
|
@ -21,7 +21,7 @@ use czkawka_core::similar_images::SimilarImages;
|
|||
use czkawka_core::temporary::Temporary;
|
||||
use czkawka_core::zeroed::ZeroedFiles;
|
||||
use gtk::prelude::*;
|
||||
use gtk::Builder;
|
||||
use gtk::{Builder, WindowPosition};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
|
@ -87,6 +87,7 @@ impl GuiData {
|
|||
let window_main: gtk::Window = builder.get_object("window_main").unwrap();
|
||||
window_main.show_all();
|
||||
window_main.set_title("Czkawka");
|
||||
window_main.set_position(WindowPosition::CenterAlways);
|
||||
|
||||
let main_notebook = GuiMainNotebook::create_from_builder(&builder);
|
||||
let upper_notebook = GuiUpperNotebook::create_from_builder(&builder);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use gtk::prelude::*;
|
||||
use gtk::WindowPosition;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct GuiSettings {
|
||||
|
@ -29,6 +30,7 @@ pub struct GuiSettings {
|
|||
impl GuiSettings {
|
||||
pub fn create_from_builder(builder: >k::Builder) -> Self {
|
||||
let window_settings: gtk::Window = builder.get_object("window_settings").unwrap();
|
||||
window_settings.set_position(WindowPosition::CenterAlways);
|
||||
|
||||
// General
|
||||
let check_button_settings_save_at_exit: gtk::CheckButton = builder.get_object("check_button_settings_save_at_exit").unwrap();
|
||||
|
|
Loading…
Reference in a new issue