-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resize handlers to sides of widgets #394
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,44 +106,60 @@ | |
} | ||
} | ||
|
||
.wc-widget .wc-bottom-resize-handle { | ||
position: absolute; | ||
height: 12px; | ||
bottom: -6px; | ||
left: 34px; | ||
right: 34px; | ||
cursor: s-resize; | ||
} | ||
.wc-widget { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just nested the resize elements |
||
.wc-bottom-resize-handle { | ||
position: absolute; | ||
height: 12px; | ||
bottom: -6px; | ||
left: 34px; | ||
right: 34px; | ||
cursor: s-resize; | ||
} | ||
|
||
.wc-widget .wc-bottom-left-resize-handle { | ||
position: absolute; | ||
width: 40px; | ||
height: 12px; | ||
bottom: -6px; | ||
left: -6px; | ||
cursor: sw-resize; | ||
.wc-bottom-left-resize-handle { | ||
position: absolute; | ||
height: 12px; | ||
width: 40px; | ||
bottom: -6px; | ||
left: -6px; | ||
cursor: sw-resize; | ||
} | ||
|
||
&.inUse { | ||
right: 0px; | ||
top: 0px; | ||
bottom: auto; | ||
left: auto; | ||
.wc-bottom-right-resize-handle { | ||
position: absolute; | ||
height: 12px; | ||
width: 40px; | ||
bottom: -6px; | ||
right: -6px; | ||
cursor: se-resize; | ||
} | ||
|
||
.wc-right-side-resize-handle { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and new styles for the side handlers |
||
position: absolute; | ||
width: 12px; | ||
height: 100%; | ||
right: -6px; | ||
cursor: e-resize; | ||
} | ||
} | ||
|
||
.wc-widget .wc-bottom-right-resize-handle { | ||
position: absolute; | ||
width: 40px; | ||
height: 12px; | ||
bottom: -6px; | ||
right: -6px; | ||
cursor: se-resize; | ||
|
||
&.inUse { | ||
left: 0px; | ||
top: 0px; | ||
bottom: auto; | ||
right: auto; | ||
.wc-left-side-resize-handle { | ||
position: absolute; | ||
width: 12px; | ||
height: 100%; | ||
left: -6px; | ||
cursor: w-resize; | ||
} | ||
|
||
.wc-bottom-left-resize-handle, | ||
.wc-bottom-right-resize-handle, | ||
.wc-right-side-resize-handle, | ||
.wc-left-side-resize-handle { | ||
&.inUse { | ||
right: 0px; | ||
top: 0px; | ||
bottom: auto; | ||
left: auto; | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
<div class="fade panel panel-default"> | ||
<div class="wc-widget-heading panel-heading"><h4 class="panel-title"><t:title/></h4><div class="wc-widget-infobuttons"><t:errorbutton/></div><div class="wc-widget-buttons"><t:minimizebutton/><t:menubutton/><t:closebutton/></div></div> | ||
<div class="wc-widget-body"><t:iframe/></div> | ||
<t:leftsideresizehandle/><t:rightsideresizehandle/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put them outside the body because the body has |
||
<div class="wc-widget-footer panel-footer"><t:leftresizehandle/><t:bottomresizehandle/><t:rightresizehandle/></div> | ||
</div> | ||
</s:styledgui> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the cursor when resizing, I need a way to pass the cursor type to the cover. This solution might not be the cleanest but I found that better than passing it through 3 levels