mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-05 18:20:09 +00:00
docking: say that the drag bar's menu opens on a right click
A left click on the drag bar focuses it and opens nothing, as designed; the Hit::DragBar docs said otherwise.
This commit is contained in:
1 parent
a76d196b80
commit
95c81fa6de
3 files changed
+7
-3
No files matched your search
@@ -14,7 +14,8 @@ use super::{DockArea, Floating, Layout, Node, render::RESIZE_HANDLES};
|
||||
pub enum Hit<P> {
|
||||
/// A tab: click activates, drag moves the panel (S1).
|
||||
Tab(P),
|
||||
/// A group's drag bar: click opens the group menu, drag moves the group (S2).
|
||||
/// A group's drag bar: drag moves the group; a right click, Enter or Space opens the group
|
||||
/// menu (S2).
|
||||
DragBar(P),
|
||||
/// The top border of a group's strip: drag moves the group (S3).
|
||||
Border(P),
|
||||
|
||||
@@ -152,8 +152,9 @@ impl<P: Clone + Eq + Hash + Debug + Send + Sync + 'static> Renderer<'_, P> {
|
||||
ui.painter().rect_stroke(rect, 0.0, self.style.border, StrokeKind::Inside);
|
||||
}
|
||||
|
||||
/// The drag bar (`drag-bar`: click, double-click, menu and drag) or the top border band
|
||||
/// (`drag-border`: drag only). Both move the whole group.
|
||||
/// The drag bar (`drag-bar`: drag, double-click, and the group menu on a right click, Enter
|
||||
/// or Space) or the top border band (`drag-border`: drag only). Both move the whole group;
|
||||
/// a left click on the bar only focuses it.
|
||||
fn group_handle(&mut self, ui: &mut Ui, name: &'static str, hit: Rect, owner: &TabGroup<'_, P>, movable: bool) {
|
||||
if !crate::docking::targets::usable(hit) {
|
||||
return;
|
||||
|
||||
@@ -180,6 +180,8 @@ A flyout fits its content the same way, without the title bar.
|
||||
- Drop previews show the destination: an outline for tabs, a line for a new group, column or dock,
|
||||
a filled half for a split. Escape or losing window focus cancels a drag.
|
||||
- Double-click a tab or drag bar to minimize a group to its strip.
|
||||
- Right-click a tab for its menu, or a drag bar for the group menu; Enter or Space on a focused
|
||||
drag bar opens it too. A left click on the drag bar only focuses it.
|
||||
- In the Frame profile, the mouse wheel over a tab strip selects the next or previous tab, and a
|
||||
middle click on a closable panel's tab closes it. `DockStyle::wheel_selects_tabs` and
|
||||
`middle_click_closes_tabs` turn either on or off in any profile.
|
||||
|
||||
Reference in new issue
Block a user