Version 10 (modified by vlado, 16 years ago) (diff) |
---|
Analysis
Overview
Frame position can be now set by changing values in a HUD or by dragging the frame move halo. The frame move halo should be replaced with a frame title bar which is draggable and moves the frame around.
- The title bar should be at the top of the frame
- Height - the title bar height is equal to halo height + title bar padding. Title bar height doesn't need to be recalculated
- Width - the title bar should contain all needed halos + frame (group) title. This means that minimum witdth is equal to number of halos + space between them + title bar padding + frame name. For selections, the title bar should not be shorter than halos + space between them + padding + amount of pixels (for example - 10)
- Color - the title bar should be semi transparent and should allow changing opacity (and color) on mouse over and mouse pressed.
Task requirements
Create the frame title bar
- This is generally a draggable halo that stays behind the other halos
- Cover the functionalities from the overview
- Height
- Width
- Color
- The position of the title bar depends on upper halo menu position - title bar is behind other halos.
- When the frame is small, the halos should appear the following way:
- Introduce another rectangle, relative to the minimal size needed for the title bar.
- Optional - include frame (group) name in the frame title bar. Selections do not need to have titles.
Task result
Source
Implementation idea
Implement with BASE_HALOS_R1
Related
FRAME_POSITION_R0 BASE_HALOS_R1
How to demo
- Insert a frame
- Move the frame
- Make the frame tiny (1x1px)
- Move the frame again
- Deselect the frame
Design
- Remove FrameMoveHaloMenu class.
- Make MainHaloMenu a parent of FrameRemoveHaloButton.
- FrameMoveHaloButton is replaced by a new class MainTitleBar extending AbstractHalo having the following functionalities.
- Mouse click and movement handling from FrameMoveHaloButton.
- Override parent(), computeTitle(), computeSize() and computeVisible() methods.
- The MainHaloMenu is the parent
- The size of the title bar is calculated as specified
- The height is equal to the biggest height of all halo buttons + padding
- The width is the maximal value between the width of the frame and the cumulative width of the halos + side padding + halo spacing + frame (group) name length calculated with default font.
- HaloMenu class is changed.
- locationSync() method modified to consider right alignment of buttons on the menu (needed for FrameRemoveHaloButton).
- HaloMenu.computeSize() protected method added.
- HaloButton.alignPos() added to specify the needed alignment of the halo button on its parent.
- Modify FrameRotateHaloMenu.computeLocation() to move rotate halo menu to the bottom right point of the frame.
- Testing
- Existing unit tests in org.sophie2.base.halos.
- Demo test
- Start HalosDemo.
- Select a frame
- There should be no frame move menu.
- There should be no move frame halo button.
- The remove frame halo button should be right aligned.
- Frame movement should be possible when dragging the title bar.
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)
Attachments
- frame2.jpg (45.8 KB) - added by deyan 16 years ago.
- smallframe.png (3.7 KB) - added by deyan 16 years ago.
- rotatedframe.png (4.2 KB) - added by deyan 16 years ago.