Compare commits
No commits in common. "master" and "0.1.0" have entirely different histories.
8 changed files with 5 additions and 136 deletions
|
@ -2,7 +2,6 @@
|
||||||
name = "iced_demo"
|
name = "iced_demo"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
22
LICENSE.md
22
LICENSE.md
|
@ -1,22 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2024 Imbus
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
24
makefile
24
makefile
|
@ -1,8 +1,6 @@
|
||||||
PROJECT = $(shell basename $(CURDIR))
|
PROJECT = $(shell basename $(CURDIR))
|
||||||
GITHASH = $(shell git rev-parse --short HEAD)
|
GITHASH = $(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
PROJ_NAME = iced-demo
|
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
cargo run
|
cargo run
|
||||||
|
|
||||||
|
@ -28,25 +26,3 @@ sign: release source-release
|
||||||
|
|
||||||
publish: sign
|
publish: sign
|
||||||
scp $(PROJECT)_$(GITHASH).tar.gz* $(PROJECT)_$(GITHASH)_source.tar.gz* server:/public/$(PROJECT)/
|
scp $(PROJECT)_$(GITHASH).tar.gz* $(PROJECT)_$(GITHASH)_source.tar.gz* server:/public/$(PROJECT)/
|
||||||
|
|
||||||
#cp packaging/$(PROJ_NAME).svg ~/.local/share/icons/
|
|
||||||
install: release
|
|
||||||
install -Dm755 target/release/$(PROJECT) ~/.local/bin/$(PROJ_NAME)
|
|
||||||
cp packaging/$(PROJ_NAME).desktop ~/.local/share/applications/
|
|
||||||
update-desktop-database ~/.local/share/applications/
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
rm -f ~/.local/bin/$(PROJ_NAME)
|
|
||||||
rm -f ~/.local/share/applications/$(PROJ_NAME).desktop
|
|
||||||
rm -f ~/.local/share/icons/$(PROJ_NAME).svg
|
|
||||||
update-desktop-database ~/.local/share/applications/
|
|
||||||
|
|
||||||
# Install the dependencies for building the RPM package
|
|
||||||
rpm-deps:
|
|
||||||
sudo dnf install rpmdevtools
|
|
||||||
sudo dnf builddep packaging/$(PROJECT).spec
|
|
||||||
|
|
||||||
# This step requires the rpm-deps specified above
|
|
||||||
rpm:
|
|
||||||
spectool -g -R packaging/$(PROJECT).spec
|
|
||||||
rpmbuild -bb packaging/$(PROJECT).spec
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Iced Demo
|
|
||||||
GenericName=Iced Demo
|
|
||||||
Comment=Iced Demo is a simple demo application
|
|
||||||
Categories=Utility
|
|
||||||
Path=/home/imbus/.local/bin
|
|
||||||
Exec=iced-demo
|
|
||||||
Icon=/home/imbus/.local/share/icons/iced-demo.svg
|
|
||||||
Terminal=false
|
|
||||||
Keywords=demo
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
||||||
<svg width="800px" height="800px" viewBox="-0.5 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
|
||||||
|
|
||||||
<title>desktop</title>
|
|
||||||
<desc>Created with Sketch Beta.</desc>
|
|
||||||
<defs>
|
|
||||||
|
|
||||||
</defs>
|
|
||||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
|
||||||
<g id="Icon-Set-Filled" sketch:type="MSLayerGroup" transform="translate(-570.000000, -465.000000)" fill="#000000">
|
|
||||||
<path d="M597,465 L574,465 C571.791,465 570,466.791 570,469 L570,483 L601,483 L601,469 C601,466.791 599.209,465 597,465 L597,465 Z M570,487 C570,489.209 571.791,491 574,491 L597,491 C599.209,491 601,489.209 601,487 L601,485 L570,485 L570,487 L570,487 Z M592,495 L590,495 L590,493 L582,493 L582,495 L580,495 C579.447,495 579,495.448 579,496 C579,496.553 579.447,497 580,497 L592,497 C592.553,497 593,496.553 593,496 C593,495.448 592.553,495 592,495 L592,495 Z" id="desktop" sketch:type="MSShapeGroup">
|
|
||||||
|
|
||||||
</path>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,55 +0,0 @@
|
||||||
# This spec is currently broken.
|
|
||||||
|
|
||||||
# Generated by rust2rpm 26
|
|
||||||
%bcond_without check
|
|
||||||
|
|
||||||
# prevent library files from being installed
|
|
||||||
%global cargo_install_lib 0
|
|
||||||
|
|
||||||
Name: iced_demo
|
|
||||||
Version: 0.1.0
|
|
||||||
Release: %autorelease
|
|
||||||
Summary: A demo application using the Iced toolkit
|
|
||||||
|
|
||||||
SourceLicense: MIT
|
|
||||||
# FIXME: paste output of %%cargo_license_summary here
|
|
||||||
License: MIT
|
|
||||||
# LICENSE.dependencies contains a full license breakdown
|
|
||||||
|
|
||||||
URL: https://git.silversoft.se/Imbus/iced_demo
|
|
||||||
Source: %{url}/archive/%{version}.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: cargo-rpm-macros >= 26
|
|
||||||
|
|
||||||
%global _description %{expand:
|
|
||||||
%{summary}.}
|
|
||||||
|
|
||||||
%description %{_description}
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -n %{name} -p1
|
|
||||||
%cargo_prep
|
|
||||||
|
|
||||||
%generate_buildrequires
|
|
||||||
%cargo_generate_buildrequires
|
|
||||||
|
|
||||||
%build
|
|
||||||
%cargo_build
|
|
||||||
%{cargo_license_summary}
|
|
||||||
%{cargo_license} > LICENSE.dependencies
|
|
||||||
|
|
||||||
%install
|
|
||||||
%cargo_install
|
|
||||||
|
|
||||||
%if %{with check}
|
|
||||||
%check
|
|
||||||
%cargo_test
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE.md
|
|
||||||
%license LICENSE.dependencies
|
|
||||||
%{_bindir}/iced_demo
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
%autochangelog
|
|
|
@ -26,7 +26,7 @@ pub fn main() -> iced::Result {
|
||||||
width: 800.0,
|
width: 800.0,
|
||||||
height: 600.0,
|
height: 600.0,
|
||||||
},
|
},
|
||||||
resizable: true,
|
resizable: false,
|
||||||
decorations: true,
|
decorations: true,
|
||||||
..window::Settings::default()
|
..window::Settings::default()
|
||||||
},
|
},
|
||||||
|
@ -70,7 +70,6 @@ impl Sandbox for Counter {
|
||||||
match message {
|
match message {
|
||||||
Message::InputChanged(value) => {
|
Message::InputChanged(value) => {
|
||||||
self.input_val = value.clone();
|
self.input_val = value.clone();
|
||||||
println!("InputChanged: {}", value);
|
|
||||||
if let Ok(value) = value.parse::<i32>() {
|
if let Ok(value) = value.parse::<i32>() {
|
||||||
self.value = value;
|
self.value = value;
|
||||||
}
|
}
|
||||||
|
@ -91,9 +90,10 @@ impl Sandbox for Counter {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.padding([0, 0])
|
.padding([55, 0])
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.into()
|
.into()
|
||||||
|
// row![TextInput::new("Search", &self.input_val).on_input(Message::InputChanged)].into()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn theme(&self) -> Theme {
|
fn theme(&self) -> Theme {
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::{message::Message::*, Counter};
|
||||||
pub fn search_bar(state: &Counter) -> Element<Message> {
|
pub fn search_bar(state: &Counter) -> Element<Message> {
|
||||||
row![TextInput::new("Search", &state.input_val)
|
row![TextInput::new("Search", &state.input_val)
|
||||||
.on_input(Message::InputChanged)
|
.on_input(Message::InputChanged)
|
||||||
.padding(Padding::from(15))
|
|
||||||
.width(300)]
|
.width(300)]
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
@ -30,8 +29,8 @@ pub fn tabs(state: &Counter) -> Element<Message> {
|
||||||
menu_tab_button("Settings", Tab::Settings),
|
menu_tab_button("Settings", Tab::Settings),
|
||||||
]
|
]
|
||||||
.padding(10)
|
.padding(10)
|
||||||
// .spacing(20)
|
.spacing(20)
|
||||||
.width(Length::Fixed(200f32))
|
.width(300)
|
||||||
.height(Length::Shrink)
|
.height(Length::Shrink)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue