Re: SpinButton size



On Mon, 2017-03-27 at 14:23 +0000, Rúben Rodrigues wrote:
hi guysm

it's possible to change size of spinbuttons? In touchscreen mode 
spinbutton are still small.. We can change it's size with css
provider?

 

That may be possible...

I found some example code in gedit C sources for changing widget sizes,
that code has changed from GTK version to GTK version. For 3.20 I have
working code like:

  # from 3.20 gedit-documents-panel.c
  let closeButton = button(newObject(typeButton, "relief", ReliefStyle.NONE, "focus-on-click", false, nil))
  let context = closeButton.getStyleContext
  context.addClass("flat")
  context.addClass("small-button")
  let icon = newThemedIconWithDefaultFallbacks("window-close-symbolic")
  let image: Image = newImage(icon, IconSize.MENU)
  objectUnref(icon)
  closeButton.add(image)
  discard gSignalConnect(closeButton, "clicked", gCallback(closeTab), scrolled)

Well, that is not for spin button, but ordinary button. And again you
did not said if you want a solution for GTK2 or GTK4 on macosx.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]