Comments (9)
Same issue with the close button inCard
from iced_aw.
Before (Expected) iced_aw: 0.7.0 | After (Wrong) iced_aw: 0.8.0 |
---|---|
![]() |
![]() |
BootstrapIcon::ChevronExpand
, BootstrapIcon::Plus
and BootstrapIcon::Box
from iced_aw.
PR's are accepted for fixes and changes. Sadly I can not do everything myself.
Before (Expected) iced_aw: 0.7.0 After (Wrong) iced_aw: 0.8.0
![]()
BootstrapIcon::ChevronExpand
,BootstrapIcon::Plus
andBootstrapIcon::Box
this should be in its own issue but I did prompt this towards the person who last did the font updates.
from iced_aw.
It seems the issue is caused because the bootstrap_font is not loaded and can be solved by adding
font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::from),
to your Application::new command list. I'm not well-versed enough with iced internals to know if this can be done by iced_aw to avoid this error but if anyone with more knowledge knows a way I feel like this should be done automatically somehow.
Regarding the improvements i mentioned in my original post, I might look into making a PR later this week if I have the time.
from iced_aw.
we can not preload fonts. it is up to the end user to load them via font load. I can always ask hector to see if he could add some sort of extension loader for fonts and such.
from iced_aw.
I'm currently working on enabling custom font size in the date picker but I seem to have run into somewhat of a wall and thought this would be the best place to ask for help. I'm able to set the font size but moving on to adjusting the picker size has proven more of an issue.
An exerpt of my current code looks like this (from layout
)
let text_width = |bounds: Size, content: &str, font: Font, size: Pixels| -> f32 {
<Renderer as iced::advanced::text::Renderer>::Paragraph::with_text(
iced::advanced::Text {
content,
bounds,
size,
font,
horizontal_alignment: Horizontal::Center,
vertical_alignment: Vertical::Center,
line_height: text::LineHeight::Relative(1.3),
shaping: text::Shaping::Advanced,
},
)
.min_width()
};
let size = text_width(bounds, "September", renderer.default_font(), self.font_size)
+ text_width(bounds, "9999", renderer.default_font(), self.font_size)
+ SPACING
+ 4.0
* text_width(
bounds,
&icon_to_string(BootstrapIcon::CaretLeftFill),
BOOTSTRAP_FONT,
self.font_size,
);
let size = size.max(300.0);
let limits = Limits::new(Size::ZERO, bounds)
.shrink(Padding::from(PADDING))
.width(Length::Fill)
.height(Length::Fill)
.max_width(size)
.max_height(size);
It seems my calculation of the required size is too small which causes strange behaviour for the layout. Is my text_width
implementation wrong or am I otherwise overcomplicating this solution? Any insight would be much appreciated as I have very limited knowledge of iced internals.
from iced_aw.
yeah, honestly I dont know how to help as originally that was made by the original maker of this library. It would just be trail and error for me as well. Best person to ask might be hector since he understand the custom widget system way better than I do XD.
from iced_aw.
this is now fixed due to #216
from iced_aw.
@Strosel If there are any other widgets that need API changes that you would like to do let me know.
from iced_aw.
Related Issues (20)
- icons in tabbar's `IconText` Arent rendered correctly HOT 4
- ContextMenu ignores window borders HOT 6
- `Picker` widget HOT 6
- Beta Update to latest Iced Master HOT 11
- run time_picker example "use_24h" don't work HOT 1
- Tabs Closing icon HOT 2
- Compatible with iced 0.12.0? HOT 4
- Tabs causes overflow and/or overlap HOT 2
- Mandatory copy trait makes it impossible to use custom message with additional parameters HOT 1
- feature request for menu - mac support HOT 1
- Can't use a PickList on a modal HOT 4
- index out of bounds in Tabs HOT 6
- Grid breaks Scrollable HOT 3
- fail to compile on the newest commit HOT 1
- A way to disable on scroll behavior in number_input HOT 1
- Card close_size extends down right when made larger HOT 2
- Grid is not scrolled together with scrollable content HOT 1
- [BUG] `tabs` panic if placed at application root HOT 3
- Numberinput requires mouse hover for keyboard input HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iced_aw.