Shift arrow icon in sap.m.Panel control of ui5 - sapui5

Can we shift arrow icon to right in sap.m.Panel in SAPUI5, I tried to search it through its documentation but unable to find it. Please suggest if it is possible to do SO by some customization of control.

Not the preferred way upto my knowledge and I don't know any other way to do it.
.sapMPanelWrappingDiv .sapUiIconPointer{
right : 0;
}
Use right : 0!important; if not working with above code.

First things first: I don't think this is a good decision UX-wise...
Anyways you have several choices to achieve this from trivial to complex:
Use CSS to position icon to the right as mentioned by santhosh
Hide the expand icon via CSS (display: none;) and use the headerToolbar aggregation. In there you can do what you want and place a button to the right with a press-listerner expanding/collapsing the panel
Override sap.m.PanelRenderer.renderHeader and adjust the icon placement right in the renderer
Here is my CSS solution (which I would go for):
.sapMPanel.myPanelIconRight .sapMPanelExpandableIcon {
right: 0;
-webkit-transform: translateY(-50%) rotate(180deg);
-ms-transform: translateY(-50%) rotate(180deg);
transform: translateY(-50%) rotate(180deg);
}
.sapMPanel.myPanelIconRight .sapMPanelWrappingDiv .sapMPanelHdr,
.sapMPanel.myPanelIconRight .sapMPanelWrappingDivTb .sapMIBar.sapMTB {
padding-right: 0;
margin-right: 3rem;
}
Please note the class I myPanelIconRight attached to the sap.m.Panel control to separate our custom styling from the UI5 CSS.
BR
Chris

Related

Aurelia modal dialog - is there a way to make the parent window fade?

Hopefully the title makes this fairly self-explanatory.
Just a bit of background, I create and launch an aurelia modal dialog which appears on top of the parent window from where it is launched.
Is there a way to make the background (parent) window appear faded. I have done something similar in .NET environments, and just wanted to know if anything similar is achievable in aurelia?
Some example aurelia-dialog links:
https://www.tutorialspoint.com/aurelia/aurelia_dialog.htm
https://aurelia.io/docs/plugins/dialog#using-the-plugin
The answer to my question turned out to be on one of the aurelia forums:
https://github.com/aurelia/dialog/issues/84#issuecomment-239429527
It's a case up updating your css to include the background / opacity settings as follows:
ai-dialog-overlay.active {
background-color: black;
opacity: .5;
}
Having said this please be aware a breaking change had since been introduced whereby 'ai-dialog' was renamed to 'ux-dialog':
https://discourse.aurelia.io/t/trouble-with-aurelia-dialog-not-displaying-correctly/1382
So the code for your css should now read:
ux-dialog-overlay.active {
opacity: 0.6;
background-color: gray;
}
I found that this was all that was needed to make the background fade on opening the aurelia-based modal dialog, as well as un-fading on closing.

Is it possible to customize the color of TabCloseButton icon in VSCode?

VSCode version 1.16
When i have unsaved changes in a file, the dot in the tab file's name is not really visible as seen below.
I'd like to highlight it somehow (e.g. to change its color). I inspected the dot element via Dev tools in VSCode and it has a ciass of action-label icon close-editor-action but i am not sure how could I implement the CSS into editors' customization..
I know about workbench.colorCustomizations settings but i have not found any documentation about this particular little thing.
The only customizable setting of tabCloseButton is changing its position but not its visual.
Does anybody know how could this be implemented?
Extension Custom CSS and JS Loader.
For instance: changing the entire unsaved tab:
.tab.dirty {
background-origin: border-box;
background-image: repeating-linear-gradient(
45deg,
transparent,
transparent 8px,
#465298 9px
);
}
Or changing close icon:
.tab.dirty .close-editor-action {
background: #465298 !important; /* here could be some inline image*/
border-radius: 50%;
}

Adding icons to an button in gwt

i have button and want to set an icon to it along with the text inside it. their is no property to add icon to button like in smartGwt .. any idea how to achieve it please help.
There are many ways of achieving this.
Way 1 : Easy way
Just set the background image via code.
myButton.getElement().getStyle().setBackgroundImage("path");
Way 2: Another easy way
Set your own html
myButton.setHtml("Pass the html string");
Way 3: Easy but gives more control
myButton.addStylename("buttonStyle")
Use css to style this
.buttonStyle{
color : red;
}
Way 4: Best way according to me
Create your own split button wrapping it around a flowpanel or horizontalPanel, with image as your first widget and button as your another widget. This gives you additional control on image and as well as button. You can have your click handler on image as well as button and you can style each one of them individually.
This is how I achieved setting an icon in my get:button.
Add an extra style class hook, mine below is btn-fa-group to your gwt button. If you use the attribute 'addStyleNames' you can define them in your stylesheet and have multiple classes.
<g:Button text=" Post Your Answer" enabled="false" ui:field="showPostButton" addStyleNames="btn btn-default btn-fa-group" />
Now in your CSS define the following declaration:
btn-fa-group:before {
color: #333333;
content: "\f0c0";
display: inline-block;
font-family: "fontawesome";
}
Some important things to note; don't forget the before selector, make sure the unicode starts with a slash and have fontAwesome installed. Alternatively you can use another glyph icon if you have the font installed.
You can set innerhtml with image in button i.e.
Button button=new Button("<image src='abc.jpg' width='200px' height='300px' />Ok");
Button bt = new Button();
bt.getElement().getStyle().setBackgroundImage("url('path/to/ur/image/imagename.extention')");
also set size of background image wrt to the size of button
bt.getElement().getStyle().setProperty("backgroundSize","30px");
Add a Css Class to your Button is probalby the best solution.
button.addStyleName("ButtonIcon");
How to define the CSS and HTML you can read here.
Yes ,you can .Gwt have a SmartGwt type button called push buttopn
com.google.gwt.user.client.ui.PushButton
You can pass Image object to it as below
Image image = new Image(GWT.getModuleBaseURL() + "/images/search-arrow.png");
RootPanel.get().add(new PushButton(image));

How can I hide the sort bar of Thunderbird?

I have almost all other elements of Thunderbird hidden to create a minimal interface. I keep my mail sorted by date only so I do not need the sort bar.
Does the sort bar have a class name (like .sortBar) that I can easily hide with CSS?
This userChrome.css works as of Thunderbird 31.1.1:
vbox#threadContentArea > tree#threadTree > treecols:first-child {
height:0 !important;
margin: 0 !important;
padding: 0 !important;
visibility: hidden !important;
}
Notes:
Just using display:none doesn't work in this case; comments welcome if someone knowledgeable with XUL / moz CSS knows why. The rules above work around that, but leave an empty space of 8px height. Again, improvements welcome :)
To create such rules, use the DOM Inspector addon (install it from Thunderbird's "Extensions" screen), then inspect the XUL tree of Thunderbird (File > Inspect Chrome Document), and try to build a CSS selector of what you want to modify.

Custom skin for facebook like button

Is there an (easy) way to customise the look of the facebook like button implemented via fbml?
I am pretty sure I saw this somewhere, but I cant remember where and I cant find any documentation on this.
You don't need to make these illegal hacking. Just use the "Open Graph": https://developers.facebook.com/docs/opengraph/actions/builtin/likes/. The downside is you need to create an app.
Are you guys lawyers or programmers? the question was HOW not '...to do or not to do...'.
#pixelistik button can be inserted either via script tag or iframe and of course you can use css with iframe just via JS, easy peasy.
#skrat good point!
#Slavic what service exactly? I call it half-service because you can like only - no place for criticism so... your criticism is not proper. Like our posts! :P
generally: if you create custom button and you didn't sign to any t&c or something like that you can do whatever you want on YOUR webpage.
Although it may not even be legal to do so (check the terms and policies for yourself), you could do something like:
/* Like button main text color */
div.like span.connect_widget_text {color:#fff;}
div.like div.connect_widget_confirmation {color:#fff;}
div.like span.connect_widget_text a {color:#ffc6ff;}
This link shows some mild styling options:
http://forum.developers.facebook.net/viewtopic.php?pid=236534
Easy peasy:
Simply set the opacity (filter for ie) to 0 and put the iframes over an image or div with a bg image. For bigger buttons simply load in multiple like buttons, don't load in too many this will make your page unbearable slow.
Hiya, you can do it with some smart CSS - http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
Although the legality of such edits is under question, I just wanted to share my findings on this subject.
I right clicked on a FB Like button in Firefox, and inspected the element with firebug. The readout of the class elements is:
.connect_widget_like_button .liketext {
background: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png) -1px -33px no-repeat;
background-image: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png);
background-repeat-x: no-repeat;
background-repeat-y: no-repeat;
background-attachment: initial;
background-position-x: -1px;
background-position-y: -33px;
background-origin: initial;
background-clip: initial;
background-color: initial;
}
This exists on line 172 of like.php
One company I know of that does use a custom like graphic is Disqus, however their button is a multi-functional element that offers you a choice between facebook & twitter onClick, which may be how they were able to customize it to their needs.