Coder Social home page Coder Social logo

Comments (7)

estebanlm avatar estebanlm commented on August 16, 2024

you can add styles.

myPresenter addStyle: 'header1'

but you need to add the style somewhere :)
this is now defined in SpStyle class>>defaultStyleSheet, in the creator method you will see

...
	.label [
		Geometry { #hResizing: true },
		.shortcut [ 
			Draw { #color: Color{ #rgb: 622413393 } },
			Font { #name: "Lucida Grande", #size: 10 }
		],
		.dim [
			Draw { #color : Color{ #rgb: 708480675 } }
		]
	],
...

that shows the label has a subclass dim that changes the color.
You can do something like this:

.header1 [ Font { #name: "Lucida Grande", #size: 10 } ]

and assign it to your label.
Now, the only problem here is that I didn't implemented the font weight property (which is what you want to be bold :P).

And yes, I know all of this require documentation :)

from newtools.

estebanlm avatar estebanlm commented on August 16, 2024

ok, now is there :)
You can add a style

.label [
    ... 
   .header [ Font { #name: "Lucida Grande", #size: 10, #bold: true } ] 
   ...
]

from newtools.

StevenCostiou avatar StevenCostiou commented on August 16, 2024

I cannot make it work.
Besides, if I have a specialized inspector and I need to apply styles only for labels of that inspector, how do I do?
For instance from the debugger inspector, does that mean I have to dig down to the label and apply a style to it?

from newtools.

estebanlm avatar estebanlm commented on August 16, 2024

you can have special styles (styles are taken from application, but in the case of Pharo they are the standard styles).
Also, you should not add special styles other than the ones that Pharo will have (this is UI design :P)
Why it does not work?
Did you try resetting the style (its cached).

from newtools.

StevenCostiou avatar StevenCostiou commented on August 16, 2024

Well I believe that Pharo style should be header bars with bold title :)
But this is not so simple: when debugging, eg, it makes sense to write things in red sometimes...

So I reseted it and no difference. I tried to put #bold: true in the .shortcut style which is applied to headers labels in StHeaderBar and no effect :'(

from newtools.

StevenCostiou avatar StevenCostiou commented on August 16, 2024

Ow, my bad... it was the wrong presenter I was modifying :D
So, it works, thanks! :)

from newtools.

estebanlm avatar estebanlm commented on August 16, 2024

Well I believe that Pharo style should be header bars with bold title :)

I could agree with that. But all headers has to be the same ;)

from newtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.