summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14efcc7)
raw | patch | inline | side by side (parent: 14efcc7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 18:37:53 +0000 (13:37 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 22 Jan 2007 03:47:55 +0000 (22:47 -0500) |
The new branch name input box was showing up too close to the labelframe
border, it was basically right on top of it on Windows. This didn't
look right when compared to the Starting Revision's expression input
field, as that had a 5 pixel padding.
So I've put the new name input box into its own frame and padded that
frame by 5 pixels, making the UI more consistent.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
border, it was basically right on top of it on Windows. This didn't
look right when compared to the Starting Revision's expression input
field, as that had a 5 pixel padding.
So I've put the new name input box into its own frame and padded that
frame by 5 pixels, making the UI more consistent.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 32c33672d6046b613f5a885ff614d7126a08c5e6..f12be315b1531754cd499756458ef3a42f23fa8f 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
global create_branch_checkout create_branch_revtype
global create_branch_head create_branch_trackinghead
- set newbranch [string trim [$w.name.t get 0.0 end]]
+ set newbranch [string trim [$w.desc.name.t get 0.0 end]]
if {![catch {exec git show-ref --verify -- "refs/heads/$newbranch"}]} {
tk_messageBox \
-icon error \
-title [wm title $w] \
-parent $w \
-message "Branch '$newbranch' already exists."
- focus $w.name.t
+ focus $w.desc.name.t
return
}
if {[catch {exec git check-ref-format "heads/$newbranch"}]} {
-title [wm title $w] \
-parent $w \
-message "We do not like '$newbranch' as a branch name."
- focus $w.name.t
+ focus $w.desc.name.t
return
}
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.name \
+ labelframe $w.desc \
-text {Branch Description} \
-font font_ui
- label $w.name.l -text {Name:} -font font_ui
- text $w.name.t \
+ frame $w.desc.name
+ label $w.desc.name.l -text {Name:} -font font_ui
+ text $w.desc.name.t \
-borderwidth 1 \
-relief sunken \
-height 1 \
-width 40 \
-font font_ui
- bind $w.name.t <Shift-Key-Tab> "focus $w.postActions.checkout;break"
- bind $w.name.t <Key-Tab> "focus $w.from.exp.t;break"
- bind $w.name.t <Key-Return> "do_create_branch_action $w;break"
- bind $w.name.t <Key> {
+ bind $w.desc.name.t <Shift-Key-Tab> "focus $w.postActions.checkout;break"
+ bind $w.desc.name.t <Key-Tab> "focus $w.from.exp.t;break"
+ bind $w.desc.name.t <Key-Return> "do_create_branch_action $w;break"
+ bind $w.desc.name.t <Key> {
if {{%K} ne {BackSpace}
&& {%K} ne {Tab}
&& {%K} ne {Escape}
if {[string first %A {~^:?*[}] >= 0} break
}
}
- pack $w.name.l -side left -padx 5
- pack $w.name.t -side left -fill x -expand 1
- pack $w.name -anchor nw -fill x -pady 5 -padx 5
+ pack $w.desc.name.l -side left -padx 5
+ pack $w.desc.name.t -side left -fill x -expand 1
+ pack $w.desc.name -padx 5 -fill x -expand 1
+ pack $w.desc -anchor nw -fill x -pady 5 -padx 5
set all_trackings [list]
foreach b [array names tracking_branches] {
-height 1 \
-width 50 \
-font font_ui
- bind $w.from.exp.t <Shift-Key-Tab> "focus $w.name.t;break"
+ bind $w.from.exp.t <Shift-Key-Tab> "focus $w.desc.name.t;break"
bind $w.from.exp.t <Key-Tab> "focus $w.postActions.checkout;break"
bind $w.from.exp.t <Key-Return> "do_create_branch_action $w;break"
pack $w.from.exp.r -side left
pack $w.postActions.checkout -anchor nw
pack $w.postActions -anchor nw -fill x -pady 5 -padx 5
- bind $w <Visibility> "grab $w; focus $w.name.t"
+ bind $w <Visibility> "grab $w; focus $w.desc.name.t"
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> "do_create_branch_action $w;break"
wm title $w "[appname] ([reponame]): Create Branch"