feature/gui-configuration:支持从 GUI 配置程序。 #4
@ -1,6 +1,6 @@
|
|||||||
use futures::future::join_all;
|
use futures::future::join_all;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
use paris::{error, info};
|
use paris::{error, info, warn};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
@ -13,7 +13,6 @@ use tokio::{
|
|||||||
sync::mpsc,
|
sync::mpsc,
|
||||||
time::{sleep, Instant},
|
time::{sleep, Instant},
|
||||||
};
|
};
|
||||||
use tracing::warn;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
picker::{
|
picker::{
|
||||||
@ -165,7 +164,8 @@ impl CoreManager {
|
|||||||
sub_pixel_index
|
sub_pixel_index
|
||||||
};
|
};
|
||||||
let global_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);
|
global_sub_pixels.insert(global_sub_pixel_index, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ impl CoreManager {
|
|||||||
if let AmbientLightMode::Follow = *lock {
|
if let AmbientLightMode::Follow = *lock {
|
||||||
drop(lock);
|
drop(lock);
|
||||||
let screenshot = picker.take_screenshot()?;
|
let screenshot = picker.take_screenshot()?;
|
||||||
info!("Take Screenshot Spend: {:?}", start.elapsed());
|
// info!("Take Screenshot Spend: {:?}", start.elapsed());
|
||||||
match tx.send(screenshot).await {
|
match tx.send(screenshot).await {
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
@ -70,7 +70,7 @@ export const DraggableStrip: FC<DraggableStripProp> = ({
|
|||||||
<span
|
<span
|
||||||
ref={ref}
|
ref={ref}
|
||||||
key={i}
|
key={i}
|
||||||
tw="opacity-30 bg-red-500 h-full w-full border border-yellow-400"
|
tw=" h-full w-full"
|
||||||
css={css`
|
css={css`
|
||||||
grid-column-start: ${i + 1};
|
grid-column-start: ${i + 1};
|
||||||
grid-row-start: ${index + 1};
|
grid-row-start: ${index + 1};
|
||||||
|
@ -17,8 +17,8 @@ const StyledContainer = styled.section(
|
|||||||
|
|
||||||
const StyledButton = styled.button(
|
const StyledButton = styled.button(
|
||||||
tw`
|
tw`
|
||||||
bg-yellow-500 rounded-full h-4 w-4 text-xs shadow select-none`,
|
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`,
|
tw`hocus:scale-105 hocus:active:scale-95 active:bg-amber-600 active:dark:bg-amber-500`,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const LedStripEditor: FC<LedStripEditorProps> = ({
|
export const LedStripEditor: FC<LedStripEditorProps> = ({
|
||||||
|
Loading…
Reference in New Issue
Block a user