Closed elifouts closed 2 months ago
Widget::ApplyPropertiesToWidget
is a function, which is called when creating a widget (as in element of a window, not as the bar itself), so the hardcoded margin is applied to every element. If you really want to do this in C++ (which I don't recommend), then you can have a look at src/Bar.cpp
and then call SetVerticalTransform/SetHorizontalTransform
on mainWidget
with Transform::marginBefore/marginAfter
as the margin
Though it can also be done with css (Which I'd recommend):
.bar {
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
}
It worked man thanks so much and keep making amazing stuff
Describe the bug Im currently editting the C++ to my liking and I seem to be unable to effectively adjust the padding on the sides of the bar so that it seems to be floading instead of flush with the side of the monitor. I was able to do this but all the widgets are spread out. I was wondering if there is a better way to do this than what I am doing or if you could add a easier way to adjust the margins!
What doesn't work? Please be as precise as possible. Setting padding in css doesnt work. I dont know if Im doing it right tho.
Steps to Reproduce Bellow I will show What I did to get to the point where the widgets are super spread out. This is in the Widgets.cpp
Expected behavior
I thought that I would be able to change the widget padding or margins and the other widgets would adapt. Idk there must be a better way right?
Screenshots/Error logs
Disregard the two bars one of them is the one on startup. just look at the 2nd one. I haven't worked too much with the css because I believe it isnt something that cant be fixed with a simple padding or width tag. anyway here is a screenshot of what it looks like. IDK how to take a screenshot on arch yet but I took a pic on my phone. Please Let me know if there is an easier way to do what Im trying to do. Ive spent Entirely too much time working on this lol. I also want to add in the end here that I think this is one of the coolest things to make. I congratulate you on this my guy its awesome. Its so minimal and just makes sense. I dont understand why there arnt more widgets and stuff like this. Anyway, just let me know if there is anything you found or anything I can do to aid in this fix. IF you font get to it no big deal I just would like to have a floating bar!!! I Also feel stupid because I feel like this is a simple fix or something that is easy to do.