I’m currently developing an application with a GUI in C for use on a Linux machine. I’m using GTK3 and building the GUI in Glade. One part of my GUI uses the GtkCalendar widget and I’d like to customize its appearance, but I’m having some trouble. I’ve been able to style many other aspects of my GUI using a css file and have attempted to do the same for the Calendar, but with limited success.
I’ve provided a screenshot showing the current state of the calendar widget with the css styles I’ve been able to apply. I’ve also attached my css code.
I’m more or less happy with how the Calendar looks now but with 2 big exceptions:
I would like the left and right arrows in the header for changing the month and year to be larger so that they’re easier to use on a touchscreen. So far I haven’t figured out a way to do that. The most I could manage was adding a shadow so they’re more visible, but I can’t seem to increase the size of the button.
The box around the currently selected day on the calendar grid is off center. While this doesn’t affect its usability, it’s aesthetically unappealing to me and would prefer to change it. Those are the 2 big issues I’m having now.
I feel if someone is able to help me solve them, I’ll be able to tweak everything else to my liking. Thanks in advance for any help or insight you can provide.
.GtkCalendarStyle {
font: 24px "FreeSans";
padding-top: 8px;
padding-bottom: 7px;
padding-left: 7px;
padding-right: 8px;
border-color: rgba(0,0,0,0);
}
.GtkCalendarStyle .button {
color: black;
box-shadow: 3px 3px 5px gray;
}
.GtkCalendarStyle .header {
background-color: rgba(240,255,255,0.5);
}
GtkCalendar Screenshot
I've attempted to change the style of a GTK3 calendar widget using css but have been unable to change everything I needed.
Related
I use CSS to customize some parts of the layouts in Vaadin. It worked fine until now. I tried to apply a new rule to one of my compoenents but it simply doesn't take effect, it stays how it is. I already have a similar rule which I tried to apply and change it, but the applying itself works, but any change I make to the CSS class doesn't take effect too.
I don't know why, but it seems like that at some point the CSS changes started not to do what they should, they just don't get active. I then tried to change existing rules which work fine, but these changes just don't appear on the webiste.
Is there any known bug or am I just doing something wrong what I have been doing right all the time? I can't help myself anymore, I am stuck with this for a time now.
Here are the CSS classes, as simple as it can be I guess:
.v-slot-slotenabrechnung {
padding-bottom: 21px;
padding-left: 21px;
}
.v-slot-myslot {
padding-bottom: 21px;
padding-left: 21px;
}
myslot is used at the moment and works fine. When I change the padding to 150px for example and rebuild the application and deploy it, nothing happens. And that's why my new class isn't working either. But attaching the myslot-class to a new component works, just not any changes to it.
I can for example change the padding to 100px and then attach it to a new component, but that's results in the 21px it had before...
Our designer prefers to provide web designs in .psd (Photoshop). When we get to create a page markup and styles, we usually have to compromise the design in favour of tools available to us. Surely the later depend on the skill of the person who implements the page, but given the following example, what is the general approach to research and arrive at the correct CSS technique to implement the design?
The example in question is the following:
In Photoshop, a text-based login button looks like this as the final result:
This is basically a [T] (text) element with the effect (Fx) applied to it. The effect is color overlay that appears to be set like this:
Without this effect, the login page in PSD looks like this:
Which is exactly how it looks in our page on the browser. If we are to get it to look exactly the same as in final .psd design, how we are to approach looking for the correct css-technique example?
We implemented the login link as <button> element with a given .css class. I've tried going with backgound-blend-mode: normal like this:
.login-box .login-button {
width: 100%;
height: 100%;
margin-left: 12.4vmax;
margin-top: 0.7vmax;
background: #5f6f8f;
border: 0;
outline: 0;
font-family: "OpenSansRegular";
color: rgb(57, 68, 98);
font-size: 0.9vmax;
font-weight: 700;
background-color: #5f6f8f;
background-blend-mode: normal;
}
but it gives the following look in Chrome:
I realize that the problem is probably related to the fact that we are using web font technique and it's not affected by the styling in browser, the same way text is affected in photoshop, but I'd appreciate a hint on how to approach the above-described problem. Thank you.
Try using adobe brackets it really comes in handy while slicing a psd. It has lots of cool feature and it would provide you with CSS hints so that you can achieve the same result as the .psd
Download brackets from here
Apply this css to the text:
Text-shadow: 0px 1px 2px rgba(255,255,255,0.2);
Ok, So I am making a travel blog through WordPress. I have made some fiddles including maps and some tables which work perfectly in the fiddle. however, now that I put it on my site - it is messing up. I think something to do with the CSS is messing it up - but I cannot find where.
The page I am having the most problem with is located here:
http://www.journeywithandrew.com/world-heritage-sites-reviews-info/
Problem (1):
The maps infobox (when an icon is clicked) is not displaying the CSS correctly.
Fiddle is here: http://jsfiddle.net/4V7en/4/
You can see what it is supposed to look like.
Problem (2):
The fusion layer I imposed is not displaying correctly when using CHROME or iOS browsers. So again, refer to the above fiddle. It displays correctly in the fiddle, and internet explorer - but not chrome. As you can see the layers is distorted in some places on my site. (like if you scroll left on the map over Australia - for example)
Problem (3):
around my check mark buttons, there seems to be a border on the table I put them in. why!?! I tried to remove this in the table (, etc) but it does not work. Not sure what CSS is causing this!
I think that is all. If someone can take a look at the site and especially using chrome you will be able to see the problems.
.caption-title-link {
text-decoration:none;
color:#41a62a;
font-size:12px;
font-family: verdana;
font-weight: bold;
}
thanks!!
1 . Add padding: 10em; to .infobox, which replaces the padding:.5em 1em at current. This should make the content sit better.
2 . Dont quite understand the issue
3 . Currently your Td is set to
border-width: 0 1px 1px 0;
Remove border-width and replace with border:none
border: none;
Thanks
Problem 1.
Table inside .infobox has a margin-bottom set. Adding .infobox table { margin-bottom: 0 } should fix it. Adjusting the td padding inside .infobox is also needed.
Em values are dependent on font-size, and in your page, you've set the font-size to 1px (vs in Fiddle, where it was 10px). Setting it back to 10px should fix the padding problems.
Problem 2. Which is fusion layer?
Problem 3. Border is coming from style.css, line 412
I am exploring some example HTML from codrops. The following CSS is used.
Searching the internet, I can see where others have used span.reference, yet I cannot find an explanation for the purpose of the .reference.
Could anyone enlighten me?
span.reference a {
color: #aaa;
text-transform: uppercase;
text-decoration: none;
text-shadow: 1px 1px 1px #000;
margin-right: 30px;
}
Let me add this link to the actual website for the example at codrops.
http://tympanus.net/codrops/2010/07/16/slide-down-box-menu/
Looking through all the html and css, I could find no class by the name of reference anywhere.
I removed all three occurrences of reference in the menu.css code to see what the result would be and the menu system example stopped working properly.
Is there an implied class, or am I missing something really basic here?
Whoops, my bad, I lost track of what I was doing. I put the inline style into a seperate menu.css, then I removed the links that went back to codrops, which you folks had correctly pointed out, there was a class called "reference".
In addition, as I was removing/changing the CSS to see how things were affected, I failed to properly comment out a specific piece, which resulted in the menus being all messed up and when I put it all back it worked so I got hung up on the class "reference" and failed to adequately troubleshoot the person manipulating the hands and fingers.
I apologize for not keeping track of what I had been doing.
"muffled sound of me with my foot in my mouth here"
It is the class on the span element.
<span class="reference">
Link
</span>
I'm designing a site (a customer portal) that will probably be used with mobile/touchscreen devices at some point in the future. In the past I've used CSS code like this:
div.Info
{
display: inline;
position: relative;
text-decoration: none;
}
div.Info span.InfoDetail
{
display: none;
}
div.Info:hover span.InfoDetail
{
padding: 3px;
display: block;
position: absolute;
top: 1em; left: 1em;
border: 3px inset Gray;
background-color: White; color: #000;
text-align: left;
white-space: nowrap;
z-index: 25;
}
to create little CSS popups that display on mouseover and they seem to work very well. However I'm conscious that this may or may not work on touchscreens so I was wondering what the "correct" behaviour was as there doesn't seem to be much consistency that I've found across the limited amount of mobile browsers I've been able to look at. I had looked about a bit and it seems that this hover event may activate if the object gains focus, so I created some test code at http://mad-halfling.webs.com/testcode.htm that displays a small popup if you mouse over the "Mouse over for detail" text or the little up-arrow image:-
on iOS (I found a demo iPad in a shop to test it) this doesn't seem to work (I only tried the text as I have only just added the image)
on MicroB on my N900, tapping the text and image both bring up the popup, fine
on Firefox (I believe it's Fennec) on my N900 tapping on either does nothing
What's your take on this - it seems a shame as it's such a useful way of making popups without having to resort to javascript, but if it won't work with touch-screens going forward I'm going to have to rethink my strategy
Cheers
MH
The fundamental problem with mouseover, including when it is used for desktop websites, is that there is no UI indication of a behavior.
This isn't a definitive answer but I've noticed that in places where you would be using "mouseover" now on a mobile device you can use "long touch". The problem though is that nothing on the UI indicates that behavior. (To be fair UI conventions that have no indication have been around for a while, like double clicking).
The rule of thumb probably should still be that just like mouseovers, critical functionality shouldn't require them.
Why not have a image of a question mark in a circle (which seems to be common idiom) near whatever you'd like a popup for, and have that have onhover and onclick functionality to display your documentation?