Icon, cleaned useless files

This commit is contained in:
Piyush मिश्रः 2022-01-14 00:43:45 +05:30
parent 02bec6cce9
commit 4aa0553da5
9 changed files with 14 additions and 50 deletions

45
.vscode/launch.json vendored
View File

@ -1,45 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'post_maker'",
"cargo": {
"args": [
"build",
"--bin=post_maker",
"--package=post_maker"
],
"filter": {
"name": "post_maker",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'post_maker'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=post_maker",
"--package=post_maker"
],
"filter": {
"name": "post_maker",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}

View File

@ -1 +0,0 @@
{"path":"/home/piyush/Projects/post_maker/imgs/75e253532946877dea6aaa5a60ffd51a.jpg","dimension":[400.0,500.0],"original_dimension":[720.0,1280.0],"crop_position":[0.0,190.0],"quote":"wow!","tag":"@juzlilthings","quote_position":853.3333333333334,"tag_position":853.3333333333334,"rgba":[25,29,34,190],"is_saved":false}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

View File

@ -1 +0,0 @@
{"path":"/home/piyush/Projects/post_maker/bearbrickjia-20211228-0002.jpg","dimension":[400.0,500.0],"original_dimension":[1440.0,1124.0],"crop_position":[270.4,0.0],"quote":"hello","tag":"","quote_position":749.3333333333334,"tag_position":749.3333333333334,"rgba":[25,29,34,190],"is_saved":false}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,6 +1,10 @@
use crate::utils::{self, Coord, ImageContainer, ImageProperties};
use crate::{
globals,
utils::{self, Coord, ImageContainer, ImageProperties},
};
use fltk::{
app, button::Button, draw, enums::Event, frame::Frame, group::Flex, prelude::*, window::Window,
app, button::Button, draw, enums::Event, frame::Frame, group::Flex, image::SvgImage,
prelude::*, window::Window,
};
use image::GenericImageView;
use std::{
@ -29,6 +33,9 @@ pub(crate) struct Page {
impl CropWindow {
pub(crate) fn new() -> Self {
let mut win = Window::new(0, 0, 500, 600, "Crop").center_screen();
if let Ok(image) = SvgImage::from_data(&globals::ICON) {
win.set_icon(Some(image));
}
let mut main_flex = Flex::default().size_of_parent().column();

View File

@ -1,7 +1,7 @@
use crate::config_window::ConfigWindow;
use crate::crop_window::CropWindow;
use crate::draw_thread::*;
use crate::utils::ImageProperties;
use crate::{config_window::ConfigWindow, globals};
use fltk::{
app,
button::Button,
@ -10,6 +10,7 @@ use fltk::{
enums::Shortcut,
frame::Frame,
group::Flex,
image::SvgImage,
input::{Input, MultilineInput},
menu,
misc::Spinner,
@ -55,6 +56,9 @@ impl MainWindow {
draw_buff: Arc<RwLock<Vec<u8>>>,
) -> Self {
let mut win = Window::new(0, 0, 1000, 600, "Post Maker").center_screen();
if let Ok(image) = SvgImage::from_data(&globals::ICON) {
win.set_icon(Some(image));
}
let mut main_flex = Flex::default().size_of_parent().column();
let menubar = menu::SysMenuBar::default();