Alex Wilson
e66e2a2535
Fix layout issue in Backgrounds preflet.
...
Add an extra column to the grid layout so that the menu fields are free
to be much bigger than the checkbox.
closes #9882
2013-07-21 23:52:55 -04:00
Alex Wilson
3bbf781c1a
Fix #8706 in Poorman - Selecting a web dir
...
There is no 'name' entry in the message from a B_OPEN_PANEL BFilePanel.
Also fix a little memory leak along the way.
2012-07-16 14:59:38 +12:00
Alex Wilson
0a96da93d1
Fix style on inline methods in PoorMan.
2012-07-16 14:59:36 +12:00
Alex Wilson
c5a09a88e9
In PoorMan: use templatized layout builders.
...
Also clean up layout a bit.
2012-07-16 14:59:35 +12:00
Alex Wilson
a1ae802279
Convert Poorman to use the Layout API.
...
Also includes many style fixes.
This patch was done by tokyo6pm, and then updated by mks after changes
to Poorman broke the patch.
ticket: #3787
2012-07-16 14:59:33 +12:00
Alex Wilson
2d4288086f
Make SpaceLayoutItem compose spacing using BControlLook.
...
This allows for passing spacing/inset flags to BSpaceLayoutItem.
Eg. in a builder, you could AddStrut(B_USE_ITEM_SPACING)
2012-07-16 14:59:32 +12:00
Alex Wilson
72cee743c2
Adapt LookTest to BMenuField API changes. Fixes #6648
2012-07-09 11:25:59 +12:00
Alex Wilson
b2070d2855
Layout tweaks in Filetypes. Fixes #6449
2012-05-04 04:04:11 +12:00
Alex Wilson
6457a6517e
Fix bug from the removal of BALMLayoutBuilder::Snake.
...
GCC considers the method chain one big function call, so pushes all
parameters onto the stack before hand (something I discovered after
quite a bit of debugging). In this case, layout->RightOf() returns NULL
before the view is added, which caused the layout to become undefined.
2012-05-03 08:45:47 +12:00
Alex Wilson
45f28e068b
Fix error in height calculation in alm/SharedSolver.
2012-05-03 08:45:45 +12:00
Alex Wilson
c8b24e3eb5
Fix BALMLayout archiving issues.
...
SharedSolver was archiving too many constraints, partly because of
multiple typos, also because it archived some which were just artifacts
of the layout process. These extra constraints are created when the
layout calls SetRange() on the left/top/right/bottom tabs during layout.
* LinearSpec/ActiveSetSolver had to be adjusted to get access to the
constraints added by the SetRange() calls.
* BALM::TabBase was adjusted to avoid a segfault during unarchiving,
caused by an unitialized member.
* ALMFriendLayoutTest was adjusted to include a more obvious custom
constraint for testing.
2012-05-03 08:45:44 +12:00
Alex Wilson
5f4e71ba4c
Replace BALMLayoutBuilder::Snake class with a stack.
...
The interface to BALMLayoutBuilder is still pretty much the same, but
this simplifies the class a bit.
2012-05-03 08:45:43 +12:00
Alex Wilson
d10cb215dc
in BALMLayout::DefaultPolicy, call printf instead of debugger.
...
This is more user friendly, debugger() was a bit drastic.
2012-05-03 08:45:42 +12:00
Alex Wilson
bf0b62a004
Add archiving to ALMFriendLayout test.
2012-05-03 08:45:40 +12:00
Alex Wilson
4199a81a8d
Add archiving to ALMHelloWorld test.
2012-05-03 08:45:39 +12:00
Alex Wilson
df2ad52040
Archive more details about areas in BALMLayout.
2012-05-03 08:45:37 +12:00
Alex Wilson
0a5e130725
Make SharedSolver BArchivable to save extra user constraints.
2012-05-03 08:45:36 +12:00
Alex Wilson
bad1d6ba7e
Make Variable::SetRange() more forgiving.
2012-05-03 08:45:35 +12:00
Alex Wilson
015e5f06d8
Make BALMLayout::BadLayoutPolicy archivable.
2012-05-03 08:45:34 +12:00
Alex Wilson
35bf0b5c1c
Add initial support for archiving a BALMLayout.
...
What's supported:
* basic archive/instantiate
* friend layouts
coming soon:
* saving of custom restraints
* archiving of BadLayoutPolicy
2012-05-03 08:45:32 +12:00
Alex Wilson
f9c58743e3
Fix possible NULL dereference in TabBase::IsInLayout().
2012-05-03 08:45:31 +12:00
Alex Wilson
4ca2a44779
Make ownership-taking idempotent during unarchiving.
...
The previous scheme made it hard to deal with reference-counted objects,
which may be owned by many objects.
2012-05-03 08:45:29 +12:00
Alex Wilson
0a408e4992
Make it possible to have a Variable not belonging to any LinearSpec.
2012-05-03 08:45:27 +12:00
Alex Wilson
bc7956c7cf
Use const overloading on BALMLayout::{X|Y}TabAt().
2012-05-03 08:45:26 +12:00
Alex Wilson
4878cc70e2
Don't remove ourselves from a BLayoutContext when it is leaving.
2012-05-03 08:45:22 +12:00
Alex Wilson
0bd511a331
Avoid use after free in RowColumnManager.cpp
...
Fixes CID 10862
2012-05-03 08:45:18 +12:00
Alex Wilson
681f48fcbc
Replace BALMLayout::Ordered*Tabs() method with *TabAt(int, bool sorted).
2012-05-03 08:45:17 +12:00
Alex Wilson
6169a6e3d1
Minimize the effect invisible items have on a BALMLayout.
...
There seems to still be some effect on positioning, but invisible items
no longer constrain the layout.
2012-05-03 08:45:16 +12:00
Alex Wilson
af6ddb01df
Improve FriendLayout test to test invalidations as well.
2012-05-03 08:45:14 +12:00
Alex Wilson
fbd2dfcf17
Refactor ActiveSetSolver::Find{Min|Max}s().
2012-05-03 08:45:13 +12:00
Alex Wilson
a9242e3d98
Properly handle unbounded results in SharedSolver::Validate{Min|Max}()
2012-05-03 08:45:12 +12:00
Alex Wilson
1cbe95140a
Refactor SharedSolver::Validate*() methods a bit more.
2012-05-03 08:45:10 +12:00
Alex Wilson
3ade12dd15
Make BALMLayout::BasePreferredSize() useful again.
2012-05-03 08:45:09 +12:00
Alex Wilson
ac84362568
Update BadLayout test to sync with OnBadLayout changes.
2012-05-03 08:45:08 +12:00
Alex Wilson
09e87fa352
Pass more information to BadLayoutPolicy.
...
Also, re-add BadLayoutPolicy invocations, which were lost while creating
SharedSolver.
2012-05-03 08:45:06 +12:00
Alex Wilson
93904ad087
Have SharedSolver return the solver result from Validate*() methods.
2012-05-03 08:45:05 +12:00
Alex Wilson
82a0965357
Improve efficiency when validating an ALM layout.
2012-05-03 08:45:04 +12:00
Alex Wilson
419fe0b8ae
Introduce SharedSolver class to improve BALMLayout's friend feature.
2012-05-03 08:45:02 +12:00
Alex Wilson
708a298e22
Refactor XTab and YTab to share a common base, TabBase.
...
TabBase takes care of layout tracking etc..
2012-05-03 08:45:01 +12:00
Alex Wilson
a9761aedbf
Refactor BALMLayout::AddItem to reduce repitition.
2012-05-03 08:45:00 +12:00
Alex Wilson
93977272f4
When adding tabs to a BALMLayout, ensure they are fully added.
2012-05-03 08:44:58 +12:00
Alex Wilson
c640be198b
Add a test for ALM's 'friend' behaviour.
2012-05-03 08:44:57 +12:00
Alex Wilson
c761a8a6d4
Let BALM::{X|Y}Tabs be in multiple BALMLayouts, if they are friendly.
2012-05-03 08:44:55 +12:00
Alex Wilson
f9cabdd009
Use BReferenceable properties of LinearSpec in BALMLayout.
...
This saves us from a potential use-afte-free bug.
2012-05-03 08:44:54 +12:00
Alex Wilson
7c3800078e
Make LinearProgramming::LinearSpec BReferenceable.
2012-05-03 08:44:53 +12:00
Alex Wilson
1c8104a70e
Add a test for nested BALMLayouts.
2012-05-03 08:44:51 +12:00
Alex Wilson
f6db102e47
Make BALMLayout respect its position when nested.
2012-05-03 08:44:50 +12:00
Alex Wilson
51b5b66b01
Remove lp_solve as a dependency of the linprog lib.
...
Really, it hasn't depended on lp_solve for a while, but it was still
linked in in some places.
2012-05-03 08:44:48 +12:00
Alex Wilson
03adc8c767
Add test for BALMLayout's bad layout handling.
2012-05-03 08:44:47 +12:00
Alex Wilson
2bbf8b1fbc
Add the ability to handle bad layouts to BALMLayout.
2012-05-03 08:44:45 +12:00
Alex Wilson
57d93f836d
Disable debug output by default in linprog.
2012-05-03 08:44:44 +12:00
Alex Wilson
3479e516b7
Compose spacing given to BALMLayout constructor.
2012-05-03 08:44:43 +12:00
Alex Wilson
548c302600
Adjust MusicCollection app for changes in BALMLayout.
2012-05-03 08:44:42 +12:00
Alex Wilson
de245ca017
Adjust IMAP addon for changes in BALMLayout.
2012-05-03 08:44:40 +12:00
Alex Wilson
20cc993ab5
Remove BALM::Area::fConstraints field, which is not needed.
...
It's easier to just delete all the constraints in the dtor, the ones that
wouldn't have been in fConstraints are NULL at this point anyway.
2012-05-03 08:44:39 +12:00
Alex Wilson
895414da9d
In BALM::Area rename fTopLeftInset to fLeftTopInset.
...
This is consistent with for instance, the BSize ctor.
2012-05-03 08:44:38 +12:00
Alex Wilson
f0307e765e
Fix spacing before first header in src/libs/alm.
...
Also add copyright header in ALMGroup.cpp.
2012-05-03 08:44:36 +12:00
Alex Wilson
324ce2851d
Add FBC padding to ALM classes.
2012-05-03 08:44:35 +12:00
Alex Wilson
7e021d45da
Make BALM::InsetForTab() methods const.
2012-05-03 08:44:34 +12:00
Alex Wilson
0da6f2e916
Rename BALM::GroupItem to BALM::ALMGroup, and move it to its own files.
...
Also make ALMGroup totally self-contained, i.e. BALMLayout no longer
does the parsing, and is completely unaware of ALMGroup. A small touch
of refactoring as well.
2012-05-03 08:44:32 +12:00
Alex Wilson
a25ffa4f04
Style cleanup in alm: mostly clean includes.
2012-05-03 08:44:31 +12:00
Alex Wilson
ddb65125f9
In alm test TableDemo: include Row.h and Column.h directly.
2012-05-03 08:44:30 +12:00
Alex Wilson
7dd17203c8
Make Area insets more consistent with other HAIKU inset APIs.
2012-05-03 08:44:29 +12:00
Alex Wilson
b99cf18c18
Remove old implementatoins of ALM tests that used the Add*To* methods.
2012-05-03 08:44:27 +12:00
Alex Wilson
d814593064
Remove BALMLayout::Add*To* methods, which are availabe in the builder.
2012-05-03 08:44:26 +12:00
Alex Wilson
2bf5ded1ed
Add BALMLayoutBuilder implementations to ALM tests.
2012-05-03 08:44:25 +12:00
Alex Wilson
50cc24b3f9
Add a Builder for BALMLayout.
2012-05-03 08:44:23 +12:00
Alex Wilson
b50d4ed8bd
Add new methods to BALMLayout for adding multiple x/y tabs at once.
2012-05-03 08:44:22 +12:00
Alex Wilson
8b52747974
In Area, remove unused ItemFrame() method.
...
Also modify Frame() method to return a rect with rounded coordinates.
2012-05-03 08:44:21 +12:00
Alex Wilson
574533ef12
In BALMLayout, make AddView(...) consistent with other layouts.
...
If a BView is added which has a BLayout, use the layout as a BLayoutItem
to represent that view, as other layouts do.
2012-05-03 08:44:19 +12:00
Alex Wilson
9b0221fd43
In alm tests, replace calls to SetInset() with SetInsets().
2012-05-03 08:44:18 +12:00
Alex Wilson
75e2dcf8fe
In BALMLayout, allow for more flexibility in spacing and insets.
...
* allow for independent left, top, right and bottom insets
* allow for independent vertical and horizontal spacing between tabs
* allow for the usage of Haiku's spacing constants such as B_USE_WINDOW_INSETS
2012-05-03 08:44:17 +12:00
Alex Wilson
1be46cf584
In ALM Views test, use explicit AddViews() method.
2012-05-03 08:44:15 +12:00
Alex Wilson
fefa17f47e
Remove unused 'PerformancePath' stuff.
2012-05-03 08:44:14 +12:00
Alex Wilson
91b523054f
Resolve TODO about possible use after free bug.
2012-04-01 11:54:25 +12:00
Alex Wilson
3c7caf81db
Fix a bug that caused some NotificationViews to be double-shown.
...
This bug affected views added while the window was hidden, and would
result in that view not being hidden when the group was collapsed for
the first time.
2012-04-01 11:54:24 +12:00
Alex Wilson
c2fbfb1d58
Don't hardcode the NotificationView width to 300px.
2012-04-01 11:54:23 +12:00
Alex Wilson
2fab0e4804
Remove dead code in NotificationView.cpp
2012-04-01 11:54:23 +12:00
Alex Wilson
ac93328eb9
Have NotificationWindow enforce the window size setting.
2012-04-01 11:54:22 +12:00
Alex Wilson
d19e651f97
Expand click rects when checking for close/collapse clicks.
2012-04-01 11:54:21 +12:00
Alex Wilson
710eb7410f
Clean up use of SetPosition().
...
This fixes a bug where an empty white window would appear when changing
workspaces if there were no notifications.
2012-04-01 11:54:20 +12:00
Alex Wilson
259ffc0252
Style cleanup in notification_server: #includes
2012-04-01 11:54:19 +12:00
Alex Wilson
617ee9eef6
be_control_look is never NULL, so we don't need backup drawing code.
2012-04-01 11:54:18 +12:00
Alex Wilson
fd3e582189
Fix bug in NotificationWindow where the window would be double hidden.
...
Also simplify and rename _ResizeAll(), now that AppGroupViews remove
themselves.
2012-04-01 11:54:17 +12:00
Alex Wilson
002fd626d6
Fix NotificationWindow's collapsing bug. ( #8288 )
...
When a BTwoDimensionalLayout has no visible elements, it has a max size
of B_SIZE_UNLIMITED in both dimensions. In this case, we want it to
shrink down to just the insets.
2012-04-01 11:54:16 +12:00
Alex Wilson
8090bd4a30
Add a TODO about a possible use after free bug.
2012-04-01 11:54:15 +12:00
Alex Wilson
80f96f761c
In NotificationWindow, have AppGroupViews get deleted upon expiry.
...
I.e. once there are no more notifications in the AppGroupView, we get
the NotificationWindow to delete it. As a result of this change, we no
longer need the AppGroupView.cpp _ResizeViews() method.
2012-04-01 11:54:14 +12:00
Alex Wilson
cbdd108a09
In NotificationWindow, delete AppGroupViews when closed.
...
This is preferable to having them kick around for as long as the server
is running. They don't yet close when all of the notifications for the
view time out, that's coming next.
2012-04-01 11:54:13 +12:00
Alex Wilson
981c729bdc
Fix potential uninitialized variable bug in BLayout::AllUnarchived().
...
BMessage::GetInfo() doesn't set the count output var in error cases.
2011-12-28 22:57:20 -07:00
Alex Wilson
9f0292314d
Fix typo in BLayout::AllArchived().
...
BLayout::AllArchived() was forwarding to BArchivable, skipping BLayoutItem.
2011-12-28 22:37:59 -07:00
Alex Wilson
f1e81e6172
Fix bug in BLayout::RemoveView().
...
Fix typo-induced bug causing (in many cases) the wrong item to be removed from the layout!
Also, improve performance from O(n * m) to O(n), although n and m will always be quite small in practice, we might as well.
2011-12-28 22:29:58 -07:00
Alex Wilson
61084e53b5
Remove clamping in new BSplitLayout methods.
...
Since clamping the index for these methods could lead to confusing side effects, we'll just avoid the clamping, and let things segfault when the programmer goes out of bounds.
Closes #7902
2011-12-22 14:16:44 -07:00
Alex Wilson
e0821f1d73
Add Hannah Boneß to the AboutSystem contributors list.
2011-12-22 13:25:32 -07:00
Alex Wilson
ab214879a0
Merge branch 'master' of ssh://git.haiku-os.org/haiku
2011-12-15 21:11:29 -07:00
Alex Wilson
a84e14ca84
Merge branch 'master' of git://github.com/haiku/haiku
2011-12-15 20:50:28 -07:00
Alex Wilson
29ef6eb52d
Fix BMenu behaviour/ABI by reinstating BMenu::InvalidateLayout()
...
It turns out,this is an old method added by Be, and is not really related to BView::InvalidateLayout(bool). In fact BMenu::InvalidateLayout() does something separate, but related to the BView method. I was wrong to delete this method, since it needs to have action taken each time it is called, so moving these actions into LayoutInvalidated() only worked sometimes (when the BView was considered to have a valid layout).
I have added a comment for future hackers so that they don't delete this method.
2011-12-08 14:09:35 -07:00
Alex Wilson
8f0b7c3fb8
Update doxygen docs for Layout, LayoutItem on invalidation.
2011-12-06 23:39:16 -07:00
Alex Wilson
ea0a06e213
Remove redundant checks for fParent before calling _InvalidateParentLayout().
2011-12-06 22:35:46 -07:00
Alex Wilson
182e2ee973
Add a bit more FBC stuff for the Layout API, which I missed before.
2011-12-01 22:47:46 -07:00
Alex Wilson
d56e7bd64d
Make archiving hooks protected in layout classes.
...
Furthermore,
* remove a stray blank line in Layout.cpp
* make BLayoutItem::SetLayout() private, as it should have been
2011-12-01 20:45:50 -07:00