spacing

Setting size of UICollectionViewCell in a way that there is no interim spacing in between

空扰寡人 提交于 2019-12-31 07:09:08
问题 I'm using an UICollectionView on which I want to place seven cells side by side. The whole screen should be used for this. Currently, I'm using the width of the collection view and divide it by seven. Now I get an item width of 45.71429 on an iPhone 4. Between some cells there is an interim spacing. How can I handle this? I want to fill out the whole screen and all items should have the same size. One option which comes to my mind is to round the value and use the remaining value as inset.

How to set the line spacing in a JtextPane?

南笙酒味 提交于 2019-12-29 08:15:35
问题 First of all, i set the JTextPane like this: HTMLEditorKit editorKit = new HTMLEditorKit(); HTMLDocument document = (HTMLDocument) editorKit.createDefaultDocument(); JTextPane textPane = new JTextPane(); textPane.setContentType("text/html"); textPane.setDocument(document); and i want to set the line spacing in the JtextPane , this is my idea,but it can't work: SimpleAttributeSet aSet = new SimpleAttributeSet(); StyleConstants.setLineSpacing(aSet, 50); textPane.setParagraphAttributes(aSet,

Qt widget (with layout) space. What is it? How to remove?

烈酒焚心 提交于 2019-12-29 01:41:30
问题 I have written a program that uses widgets as container (for other widgets). Because the contents of the container varies along the program life, the container widget has a layout associated to it so it resizes properly. The problem is that the container seems to consume some space. In the following program, I have reproduced the problem: I have a group with a few labels, where one of them is included in a container (the widget w -and its layout t- includes the label "what is that extra space

Images in an array, not spacing correctly

久未见 提交于 2019-12-25 10:00:49
问题 The shapes are at the top of the image. http://picturepush.com/public/6472916 The code looks like this: local xOffset = 0 for i = 1, levelPacks[prevCurrentLevelPack][prevCurrentLevel].ammount do if i == 1 then --setup first one shapesPrevArray[i].x = 30 shapesPrevArray[i].y = 41 shapesPrevArray[i].isVisible = true end if i > 1 then --setup the rest --width of previous one plus the x value of the previous one to make them next to eachother. xOffset = shapesPrevArray[i - 1].width +

How to remove spacing between buttons in Unity3D?

自闭症网瘾萝莉.ら 提交于 2019-12-24 04:01:53
问题 I'm creating buttons programmatically in a game I'm designing in Unity. I instantiate the button prefab and parent them to the Panel object on the canvas. I've set the Panel to have a Horizontal Layout Group with the following properties: I've added the following components to the button prefab to achieve the look I require: After doing all this here's the result I end up with: Therefore, my question is, how can I remove the spacing between each of the buttons? The buttons are supposed to be

How to remove spacing between buttons in Unity3D?

微笑、不失礼 提交于 2019-12-24 04:01:19
问题 I'm creating buttons programmatically in a game I'm designing in Unity. I instantiate the button prefab and parent them to the Panel object on the canvas. I've set the Panel to have a Horizontal Layout Group with the following properties: I've added the following components to the button prefab to achieve the look I require: After doing all this here's the result I end up with: Therefore, my question is, how can I remove the spacing between each of the buttons? The buttons are supposed to be

How to set bar widths independent of ticks in matplotlib?

余生颓废 提交于 2019-12-24 01:45:36
问题 I'm working on a cascade chart (something in this style) using matplotlib. I'd like to get all of my bars of varying widths flush with each other, but I'd like the ticks at the bottom to increase regularly from 1 to 7, independent of the bars. However, at the moment, it looks like this: So far this is what I've got: python import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator, FormatStrFormatter n_groups = 6 name=['North America','Russia','Central &

Why do bottom padding and bottom margins not help to add vertical spacing between these links?

你说的曾经没有我的故事 提交于 2019-12-23 12:10:06
问题 I have a div with links in it. And I'm lining them up one over the other with <br> tags because I couldn't figure out how to add vertical spacingn with CSS. I tried adding a bottom margin and a bottom padding to the a style rule but it didn't seem to have any effect (why?). I could add another <br> tag to separate them more but I have to assume there's a nicer way to do this with CSS that I just haven't been able to figure out. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

CSS space lines between spans

谁说胖子不能爱 提交于 2019-12-22 10:56:19
问题 I have this structure: <div class="gBigPage"> <span class="gBigMonthShort">FEB</span><br /> <span class="gBigDayShort">23</span><br /> <span class="gBigYearShort">2011</span> </div> The gaps between the text lines are too big, I need them shortened so they are all virtually touching. /* Mouseover div for day numbers */ .gBigPage{ height:45px; width:30px; font-family:Arial; font-weight:bold; background-color:#ffee99; text-align:center; border-top:1px solid #c0c0c0; border-left:1px solid

Reduce space between code chunks and code output in rmarkdown beamer presentation

假如想象 提交于 2019-12-20 09:16:55
问题 I'm building a presentation using rmarkdown and LaTeX/Beamer. I would like to reduce the spacing between the displayed R-commands and R-output. I believe this is related to the paragraph spacing options in LaTeX/Beamer. Is this something I should do in rmarkdown (chunk options, knit_hooks, or something else?), in the pandoc Yaml header (some pandoc option?), or in the LaTeX beamer template file? I feel like it should be in the LaTeX template file. Below is a working example of a minimal