mirror of
https://github.com/MeexReay/bRAC.git
synced 2025-05-06 13:38:04 +03:00
da
This commit is contained in:
parent
4f78d48b10
commit
26ebf5a3cb
@ -18,7 +18,7 @@ gtk4 = { version = "0.9.6", optional = true }
|
||||
cfg-if = "1.0.0"
|
||||
|
||||
[features]
|
||||
default = ["ssl", "homedir", "pretty_tui"]
|
||||
default = ["ssl", "homedir", "gtk_gui"]
|
||||
ssl = ["dep:native-tls"]
|
||||
pretty_tui = ["dep:crossterm"]
|
||||
gtk_gui = ["dep:gtk4"]
|
||||
|
18
shell.nix
Normal file
18
shell.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
devDeps = with pkgs; [
|
||||
pkg-config
|
||||
openssl
|
||||
gtk4
|
||||
pango
|
||||
];
|
||||
in pkgs.mkShell {
|
||||
shellHook = ''
|
||||
export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc}
|
||||
'';
|
||||
buildInputs = devDeps;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
] ++ devDeps;
|
||||
}
|
@ -4,10 +4,11 @@ use std::time::Duration;
|
||||
use colored::{Color, Colorize};
|
||||
use gtk4::gdk::Display;
|
||||
use gtk4::gdk_pixbuf::PixbufLoader;
|
||||
use gtk4::gio::MenuModel;
|
||||
use gtk4::glib::clone::Downgrade;
|
||||
use gtk4::glib::{idle_add_local, idle_add_local_once, ControlFlow, source::timeout_add_local_once};
|
||||
use gtk4::{glib, glib::clone, Align, Box as GtkBox, Label, ScrolledWindow};
|
||||
use gtk4::{CssProvider, Entry, Orientation, Overlay, Picture};
|
||||
use gtk4::{CssProvider, Entry, Orientation, Overlay, Picture, PopoverMenuBar};
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::{Application, ApplicationWindow, Button};
|
||||
use std::sync::mpsc::{channel, Sender, Receiver};
|
||||
@ -87,11 +88,6 @@ pub fn recv_tick(ctx: Arc<Context>) -> Result<(), Box<dyn Error>> {
|
||||
fn build_ui(ctx: Arc<Context>, app: &Application) {
|
||||
let main_box = GtkBox::new(Orientation::Vertical, 5);
|
||||
|
||||
main_box.set_margin_bottom(5);
|
||||
main_box.set_margin_end(5);
|
||||
main_box.set_margin_start(5);
|
||||
main_box.set_margin_top(5);
|
||||
|
||||
let chat_box = GtkBox::new(Orientation::Vertical, 2);
|
||||
|
||||
let chat_scrolled = ScrolledWindow::builder()
|
||||
@ -195,6 +191,7 @@ fn build_ui(ctx: Arc<Context>, app: &Application) {
|
||||
.default_height(500)
|
||||
.resizable(false)
|
||||
.decorated(true)
|
||||
.show_menubar(true)
|
||||
.child(&overlay)
|
||||
.build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user