feature/gui-configuration:支持从 GUI 配置程序。 #4

Merged
Ivan merged 19 commits from feature/gui-configuration into master 2023-01-26 23:44:19 +08:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit af671a4e63 - Show all commits

View File

@ -1,6 +1,6 @@
use futures::future::join_all;
use once_cell::sync::OnceCell;
use paris::{error, info};
use paris::{error, info, warn};
use serde::{Deserialize, Serialize};
use std::{
@ -13,7 +13,6 @@ use tokio::{
sync::mpsc,
time::{sleep, Instant},
};
use tracing::warn;
use crate::{
picker::{
@ -165,7 +164,8 @@ impl CoreManager {
sub_pixel_index
};
let global_sub_pixel_index =
(sign * (pixel_index as isize * 3 + offset as isize) + start ) as usize;
(sign * (pixel_index as isize * 3 + offset as isize) + start)
as usize;
global_sub_pixels.insert(global_sub_pixel_index, color);
}
}
@ -220,7 +220,7 @@ impl CoreManager {
if let AmbientLightMode::Follow = *lock {
drop(lock);
let screenshot = picker.take_screenshot()?;
info!("Take Screenshot Spend: {:?}", start.elapsed());
// info!("Take Screenshot Spend: {:?}", start.elapsed());
match tx.send(screenshot).await {
Ok(_) => {}
Err(err) => {

View File

@ -70,7 +70,7 @@ export const DraggableStrip: FC<DraggableStripProp> = ({
<span
ref={ref}
key={i}
tw="opacity-30 bg-red-500 h-full w-full border border-yellow-400"
tw=" h-full w-full"
css={css`
grid-column-start: ${i + 1};
grid-row-start: ${index + 1};

View File

@ -17,8 +17,8 @@ const StyledContainer = styled.section(
const StyledButton = styled.button(
tw`
bg-yellow-500 rounded-full h-4 w-4 text-xs shadow select-none`,
tw`hocus:scale-105 hocus:active:scale-95 active:bg-amber-600`,
bg-yellow-500 dark:bg-amber-600 rounded-full h-4 w-4 text-xs shadow select-none`,
tw`hocus:scale-105 hocus:active:scale-95 active:bg-amber-600 active:dark:bg-amber-500`,
);
export const LedStripEditor: FC<LedStripEditorProps> = ({