typo
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
8669962904
commit
075760b7ba
@@ -6,7 +6,7 @@ pub(crate) const DEFAULT_COLUMN_WIDTH: f64 = 125.0;
|
|||||||
pub(crate) const DEFAULT_ROW_HEIGHT: f64 = 28.0;
|
pub(crate) const DEFAULT_ROW_HEIGHT: f64 = 28.0;
|
||||||
pub(crate) const COLUMN_WIDTH_FACTOR: f64 = 12.0;
|
pub(crate) const COLUMN_WIDTH_FACTOR: f64 = 12.0;
|
||||||
pub(crate) const ROW_HEIGHT_FACTOR: f64 = 2.0;
|
pub(crate) const ROW_HEIGHT_FACTOR: f64 = 2.0;
|
||||||
pub(crate) const DEFAULT_WINDOW_HEIGH: i64 = 600;
|
pub(crate) const DEFAULT_WINDOW_HEIGHT: i64 = 600;
|
||||||
pub(crate) const DEFAULT_WINDOW_WIDTH: i64 = 800;
|
pub(crate) const DEFAULT_WINDOW_WIDTH: i64 = 800;
|
||||||
|
|
||||||
pub(crate) const LAST_COLUMN: i32 = 16_384;
|
pub(crate) const LAST_COLUMN: i32 = 16_384;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use std::collections::HashMap;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
calc_result::Range,
|
calc_result::Range,
|
||||||
constants::{DEFAULT_WINDOW_HEIGH, DEFAULT_WINDOW_WIDTH},
|
constants::{DEFAULT_WINDOW_HEIGHT, DEFAULT_WINDOW_WIDTH},
|
||||||
expressions::{
|
expressions::{
|
||||||
lexer::LexerMode,
|
lexer::LexerMode,
|
||||||
parser::{
|
parser::{
|
||||||
@@ -359,7 +359,7 @@ impl Model {
|
|||||||
WorkbookView {
|
WorkbookView {
|
||||||
sheet: 0,
|
sheet: 0,
|
||||||
window_width: DEFAULT_WINDOW_WIDTH,
|
window_width: DEFAULT_WINDOW_WIDTH,
|
||||||
window_height: DEFAULT_WINDOW_HEIGH,
|
window_height: DEFAULT_WINDOW_HEIGHT,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
constants::{
|
constants::{
|
||||||
DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, DEFAULT_WINDOW_HEIGH, DEFAULT_WINDOW_WIDTH,
|
DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, DEFAULT_WINDOW_HEIGHT, DEFAULT_WINDOW_WIDTH,
|
||||||
LAST_COLUMN,
|
LAST_COLUMN,
|
||||||
},
|
},
|
||||||
test::util::new_empty_model,
|
test::util::new_empty_model,
|
||||||
@@ -87,7 +87,7 @@ fn last_colum() {
|
|||||||
fn page_down() {
|
fn page_down() {
|
||||||
let model = new_empty_model();
|
let model = new_empty_model();
|
||||||
let mut model = UserModel::from_model(model);
|
let mut model = UserModel::from_model(model);
|
||||||
let window_height = DEFAULT_WINDOW_HEIGH as f64;
|
let window_height = DEFAULT_WINDOW_HEIGHT as f64;
|
||||||
let row_height = DEFAULT_ROW_HEIGHT;
|
let row_height = DEFAULT_ROW_HEIGHT;
|
||||||
let row_count = f64::floor(window_height / row_height) as i32;
|
let row_count = f64::floor(window_height / row_height) as i32;
|
||||||
model.on_page_down().unwrap();
|
model.on_page_down().unwrap();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#![allow(clippy::unwrap_used)]
|
#![allow(clippy::unwrap_used)]
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
constants::{DEFAULT_ROW_HEIGHT, DEFAULT_WINDOW_HEIGH, DEFAULT_WINDOW_WIDTH},
|
constants::{DEFAULT_ROW_HEIGHT, DEFAULT_WINDOW_HEIGHT, DEFAULT_WINDOW_WIDTH},
|
||||||
test::util::new_empty_model,
|
test::util::new_empty_model,
|
||||||
UserModel,
|
UserModel,
|
||||||
};
|
};
|
||||||
@@ -11,7 +11,7 @@ fn basic_test() {
|
|||||||
let model = new_empty_model();
|
let model = new_empty_model();
|
||||||
let mut model = UserModel::from_model(model);
|
let mut model = UserModel::from_model(model);
|
||||||
let window_height = model.get_window_height().unwrap();
|
let window_height = model.get_window_height().unwrap();
|
||||||
assert_eq!(window_height, DEFAULT_WINDOW_HEIGH);
|
assert_eq!(window_height, DEFAULT_WINDOW_HEIGHT);
|
||||||
|
|
||||||
let window_width = model.get_window_width().unwrap();
|
let window_width = model.get_window_width().unwrap();
|
||||||
assert_eq!(window_width, DEFAULT_WINDOW_WIDTH);
|
assert_eq!(window_width, DEFAULT_WINDOW_WIDTH);
|
||||||
|
|||||||
0
bindings/python/run_examples.sh
Executable file → Normal file
0
bindings/python/run_examples.sh
Executable file → Normal file
0
bindings/python/run_tests.sh
Executable file → Normal file
0
bindings/python/run_tests.sh
Executable file → Normal file
@@ -1,3 +1,3 @@
|
|||||||
export const TOOLBAR_HEIGH = 48;
|
export const TOOLBAR_HEIGHT = 48;
|
||||||
export const FORMULA_BAR_HEIGH = 40;
|
export const FORMULA_BAR_HEIGHT = 40;
|
||||||
export const NAVIGATION_HEIGH = 40;
|
export const NAVIGATION_HEIGHT = 40;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
COLUMN_WIDTH_SCALE,
|
COLUMN_WIDTH_SCALE,
|
||||||
ROW_HEIGH_SCALE,
|
ROW_HEIGH_SCALE,
|
||||||
} from "./WorksheetCanvas/constants";
|
} from "./WorksheetCanvas/constants";
|
||||||
import { FORMULA_BAR_HEIGH } from "./constants";
|
import { FORMULA_BAR_HEIGHT } from "./constants";
|
||||||
import Editor from "./editor/editor";
|
import Editor from "./editor/editor";
|
||||||
import type { WorkbookState } from "./workbookState";
|
import type { WorkbookState } from "./workbookState";
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ const Container = styled("div")`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${(properties): string =>
|
background: ${(properties): string =>
|
||||||
properties.theme.palette.background.default};
|
properties.theme.palette.background.default};
|
||||||
height: ${FORMULA_BAR_HEIGH}px;
|
height: ${FORMULA_BAR_HEIGHT}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const AddressContainer = styled("div")`
|
const AddressContainer = styled("div")`
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Menu, Plus } from "lucide-react";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { theme } from "../../theme";
|
import { theme } from "../../theme";
|
||||||
import { NAVIGATION_HEIGH } from "../constants";
|
import { NAVIGATION_HEIGHT } from "../constants";
|
||||||
import { StyledButton } from "../toolbar";
|
import { StyledButton } from "../toolbar";
|
||||||
import type { WorkbookState } from "../workbookState";
|
import type { WorkbookState } from "../workbookState";
|
||||||
import SheetListMenu from "./menus";
|
import SheetListMenu from "./menus";
|
||||||
@@ -97,7 +97,7 @@ const Container = styled("div")`
|
|||||||
left: 0px;
|
left: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: ${NAVIGATION_HEIGH}px;
|
height: ${NAVIGATION_HEIGHT}px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import {
|
|||||||
import { theme } from "../theme";
|
import { theme } from "../theme";
|
||||||
import BorderPicker from "./borderPicker";
|
import BorderPicker from "./borderPicker";
|
||||||
import ColorPicker from "./colorPicker";
|
import ColorPicker from "./colorPicker";
|
||||||
import { TOOLBAR_HEIGH } from "./constants";
|
import { TOOLBAR_HEIGHT } from "./constants";
|
||||||
import FormatMenu from "./formatMenu";
|
import FormatMenu from "./formatMenu";
|
||||||
import {
|
import {
|
||||||
NumberFormats,
|
NumberFormats,
|
||||||
@@ -385,8 +385,8 @@ const ToolbarContainer = styled("div")`
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${({ theme }) => theme.palette.background.paper};
|
background: ${({ theme }) => theme.palette.background.paper};
|
||||||
height: ${TOOLBAR_HEIGH}px;
|
height: ${TOOLBAR_HEIGHT}px;
|
||||||
line-height: ${TOOLBAR_HEIGH}px;
|
line-height: ${TOOLBAR_HEIGHT}px;
|
||||||
border-bottom: 1px solid ${({ theme }) => theme.palette.grey["300"]};
|
border-bottom: 1px solid ${({ theme }) => theme.palette.grey["300"]};
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
border-radius: 4px 4px 0px 0px;
|
border-radius: 4px 4px 0px 0px;
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import {
|
|||||||
} from "./WorksheetCanvas/constants";
|
} from "./WorksheetCanvas/constants";
|
||||||
import WorksheetCanvas from "./WorksheetCanvas/worksheetCanvas";
|
import WorksheetCanvas from "./WorksheetCanvas/worksheetCanvas";
|
||||||
import {
|
import {
|
||||||
FORMULA_BAR_HEIGH,
|
FORMULA_BAR_HEIGHT,
|
||||||
NAVIGATION_HEIGH,
|
NAVIGATION_HEIGHT,
|
||||||
TOOLBAR_HEIGH,
|
TOOLBAR_HEIGHT,
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
import Editor from "./editor/editor";
|
import Editor from "./editor/editor";
|
||||||
import type { Cell } from "./types";
|
import type { Cell } from "./types";
|
||||||
@@ -439,10 +439,10 @@ const SheetContainer = styled("div")`
|
|||||||
const Wrapper = styled("div")({
|
const Wrapper = styled("div")({
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
overflow: "scroll",
|
overflow: "scroll",
|
||||||
top: TOOLBAR_HEIGH + FORMULA_BAR_HEIGH + 1,
|
top: TOOLBAR_HEIGHT + FORMULA_BAR_HEIGHT + 1,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: NAVIGATION_HEIGH + 1,
|
bottom: NAVIGATION_HEIGHT + 1,
|
||||||
overscrollBehavior: "none",
|
overscrollBehavior: "none",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user