Search Results

Search found 5988 results on 240 pages for 'layout'.

Page 20/240 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Dual-Monitor layout and primary display with Nvidia in Gnome-Shell

    - by java4fun
    I have installed Ubuntu 14.04.1 with gnome-shell version 3.10.4. I can attach a second monitor to my laptop and it is recognized. If I configure it with the nvidia-settings at the right of my laptop then all works fine (the extention of the display works as an extention on the right, not dual). Now what I want is to have the second monitor configured over the laptop-display. When I'm not using gnome-shell, it works correct (I can drag an application from the bottom display to the top normally) but with gnome-shell I have to press Ctrl+Shift+ mouse help, and resize properly the application size. This is for me an enforcing. Is there a way to make that gnome-shell work properly with a bottom/top monitor?

    Read the article

  • How would the optimal Emacs-keyboard look like?

    - by Thorsten
    Emacs is a historic piece of software. It promises outstanding productivity for keyboard wizards that really want to explore it's power. The effective use of the keyboard is key to Emacs productivity, but the keyboard hardware has changed a lot since the old days, so many modern Emacs users are struggling with weird 'Emacs chords' on their Windows/IBM keyboards. If one would design a keyboard that is entirely focused on the needs of Emacs users - how would it look like? I assume the following: the standard keybindings of Emacs are accepted, redefinitions are rare exceptions we are only talking about QWERTY keyboards (including regional variations like QWERTZ) we are only considering users applying the (10 fingers) touch typing system. the question is not only about remapping the keys of existing keyboards (perfectly possible on Linux with .xmodmap and on Windows with keytweak, for example) - think about the perfect keyboard-hardware you would like to see on your desk while hacking in Emacs all day long. Please tag your answer with your locale, i.e. [en] or [de], so that everybody knows what regional layout you are using. I will answer my own question below, to show you the results of some investigation and experimentation, but I really would like to read about different approaches and their pro's and con's. The emacswiki has a somehow related page with a lot of links (http://www.emacswiki.org/emacs/RepeatedStrainInjury), but here it's about optimal keyboard design for maximal productivity, assuming avoidance of RSI as a byproduct.

    Read the article

  • Diagnosing xmodmap errors

    - by intuited
    I'm getting this error when trying to use xmodmap to get rid of caps lock: $ xmodmap -e 'clear Lock' X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 118 (X_SetModifierMapping) Value in failed request: 0x17 Serial number of failed request: 8 Current serial number in output stream: 8 I'm running xfce on Maverick "10.10" Meercat. This problem did not occur before I added the Keyboard Layouts applet to a panel; before doing that, I was able to run my xmodmap script to swap Esc and CapsLock: !Remap Caps_Lock as Escape remove Lock = Caps_Lock keysym Caps_Lock = Escape It may be relevant that I chose alt-capslock as the keyboard switch combo in the Keyboard Layouts preferences. I've had a similar problem before, on a different machine, running openbox. On that machine, this problem started when I upgraded to Lucid, and has persisted in Maverick (release 10.10). I reported a bug in xorg. However, it remains unclear whether it's really a problem with xorg, or if I'm just doing something wrong with my configuration. Have other people experienced this problem? Can someone shed some light on what's going on here? It seems there are quite a few layers involved, and I don't understand any of them particularly well, so any information would be helpful. update I've discovered that the problem is specifically triggered by adding the Canada layout variant "Multilingual" (ca-multix). If I instead add the variant "Multilingual (first part)", the problem does not occur. I think this will probably end up being a usable workaround, but I don't yet know what the difference between these variants is. I've filed a freedesktop issue, and am commenting on a related ubuntu issue.

    Read the article

  • Diagnosing xmodmap errors

    - by intuited
    I'm getting this error when trying to use xmodmap to get rid of caps lock: $ xmodmap -e 'clear Lock' X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 118 (X_SetModifierMapping) Value in failed request: 0x17 Serial number of failed request: 8 Current serial number in output stream: 8 I'm running xfce on Maverick "10.10" Meercat. This problem did not occur before I added the Keyboard Layouts applet to a panel; before doing that, I was able to run my xmodmap script to swap Esc and CapsLock: !Remap Caps_Lock as Escape remove Lock = Caps_Lock keysym Caps_Lock = Escape It may be relevant that I chose alt-capslock as the keyboard switch combo in the Keyboard Layouts preferences. I've had a similar problem before, on a different machine, running openbox. On that machine, this problem started when I upgraded to Lucid, and has persisted in Maverick (release 10.10). I reported a bug in xorg. However, it remains unclear whether it's really a problem with xorg, or if I'm just doing something wrong with my configuration. Have other people experienced this problem? Can someone shed some light on what's going on here? It seems there are quite a few layers involved, and I don't understand any of them particularly well, so any information would be helpful. update I've discovered that the problem is specifically triggered by adding the Canada layout variant "Multilingual" (ca-multix). If I instead add the variant "Multilingual (first part)", the problem does not occur. I think this will probably end up being a usable workaround, but I don't yet know what the difference between these variants is. I've filed a freedesktop issue, and am commenting on a related ubuntu issue.

    Read the article

  • How to change CapsLock key to produce "a"?

    - by Pit
    While typing I often hit the CapsLock key instead of the a key. (QWERTZU keyboard) This is quite annoying because the moment I realise that I hit the wrong key, I will have to delete multiple character/lines of text an rewrite them in the right form. I am searching for a way to prevent this. I have found a possibility to disable the CapsLock key in Keyboard Layout Options. But this would in my case mean that instead of writing an a I would write nothing. Positive - I don't have to rewrite a whole line, but only one character Negative - It's not that obvious that I hit the wrong key, as a missing character is not perceivable as an upper-case line of text. I would therefore prefer a possibility to map CapsLock to a . Thus when hitting CapsLock an a character would be written. Positive - If I hit CapsLock instead of a I get the output I actually wanted to type. Negative - If I hit CapsLock in any other context I will get an a character. As I don't ever intentionally use the CapsLock key this would not really pose a problem. (I think, or does it?) My Question: So how do I change to a ? And is there any case where this could be dangerous/provoke unwanted behaviour?

    Read the article

  • WPF dynamic layout: how to enforce square proportions (width equals height)?

    - by Gart
    I'm learning WPF and can't figure out how to enfore my buttons to take a square shape. Here is my XAML Markup: <Window x:Class="Example" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="368" Width="333"> <Window.Resources> <Style x:Key="ToggleStyle" BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="{x:Type RadioButton}"> </Style> </Window.Resources> <RadioButton Style="{StaticResource ToggleStyle}"> Very very long text </RadioButton> </Window> Specifying explicit values for Width and Height attributes seems like a wrong idea - the button should calculate its dimensions based on its contents automagically, but keep its width and height equal. Is this possible?

    Read the article

  • WPF Layout algorithm woes - control will resize, but not below some arbitrary value.

    - by Quantumplation
    I'm working on an application for a client, and one of the requirements is the ability to make appointments, and display the current week's appointments in a visual format, much like in Google Calender's or Microsoft Office. I found a great (3 part) article on codeproject, in which he builds a "RangePanel", and composes one for each "period" (for example, the work day.) You can find part 1 here: http://www.codeproject.com/KB/WPF/OutlookWpfCalendarPart1.aspx The code presents, but seems to choose an arbitrary height value overall (440.04), and won't resize below that without clipping. What I mean to say, is that the window/container will resize, but it just cuts off the bottom of the control, instead of recalculating the height of the range panels, and the controls in the range panels representing the appointment. It will resize and recalculate for greater values, but not less. Code-wise, what's happening is that when you resize below that value, first the "MeasureOverride" is called with the correct "new height". However, by the time the "ArrangeOverride" method is called, it's passing the same 440.04 value as the height to arrange to. I need to find a solution/workaround, but any information that you can provide that might direct me for things to look into would also be greatly appreciated ( I understand how frustrating it is to debug code when you don't have the codebase in front of you. :) ) The code for the various Arrange and Measure functions are provided below. The "CalendarView" control has a "CalendarViewContentPresenter", which handles several periods. Then, the periods have a "CalendarPeriodContentPresenter", which handles each "block" of appointments. Finally, the "RangePanel" has it's own implementation. (To be honest, i'm still a bit hazy on how the control works, so if my explanations are a bit hazy, the article I linked probably has a more cogent explanation. :) ) CalendarViewContentPresenter: protected override Size ArrangeOverride(Size finalSize) { int columnCount = this.CalendarView.Periods.Count; Size columnSize = new Size(finalSize.Width / columnCount, finalSize.Height); double elementX = 0; foreach (UIElement element in this.visualChildren) { element.Arrange(new Rect(new Point(elementX, 0), columnSize)); elementX = elementX + columnSize.Width; } return finalSize; } protected override Size MeasureOverride(Size constraint) { this.GenerateVisualChildren(); this.GenerateListViewItemVisuals(); // If it's coming back infinity, just return some value. if (constraint.Width == Double.PositiveInfinity) constraint.Width = 10; if (constraint.Height == Double.PositiveInfinity) constraint.Height = 10; return constraint; } CalendarViewPeriodPersenter: protected override Size ArrangeOverride(Size finalSize) { foreach (UIElement element in this.visualChildren) { element.Arrange(new Rect(new Point(0, 0), finalSize)); } return finalSize; } protected override Size MeasureOverride(Size constraint) { this.GenerateVisualChildren(); return constraint; } RangePanel: protected override Size ArrangeOverride(Size finalSize) { double containerRange = (this.Maximum - this.Minimum); foreach (UIElement element in this.Children) { double begin = (double)element.GetValue(RangePanel.BeginProperty); double end = (double)element.GetValue(RangePanel.EndProperty); double elementRange = end - begin; Size size = new Size(); size.Width = (Orientation == Orientation.Vertical) ? finalSize.Width : elementRange / containerRange * finalSize.Width; size.Height = (Orientation == Orientation.Vertical) ? elementRange / containerRange * finalSize.Height : finalSize.Height; Point location = new Point(); location.X = (Orientation == Orientation.Vertical) ? 0 : (begin - this.Minimum) / containerRange * finalSize.Width; location.Y = (Orientation == Orientation.Vertical) ? (begin - this.Minimum) / containerRange * finalSize.Height : 0; element.Arrange(new Rect(location, size)); } return finalSize; } protected override Size MeasureOverride(Size availableSize) { foreach (UIElement element in this.Children) { element.Measure(availableSize); } // Constrain infinities if (availableSize.Width == double.PositiveInfinity) availableSize.Width = 10; if (availableSize.Height == double.PositiveInfinity) availableSize.Height = 10; return availableSize; }

    Read the article

  • 3-row layout, expanding middle, min-height:100% so footer is at bottom when there is minimal content

    - by David Lawson
    How would I change this to make the middle div expand vertically to fill the white space? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> body,td,th { font-family: Tahoma, Geneva, Verdana, sans-serif; } html,body { margin:0; padding:0; height:100%; /* needed for container min-height */ } #container { position:relative; /* needed for footer positioning*/ margin:0 auto; /* center, not in IE5 */ width:100%; height:auto !important; /* real browsers */ height:100%; /* IE6: treaded as min-height*/ min-height:100%; /* real browsers */ } #header { height: 150px; border-bottom: 2px solid #ff8800; position: relative; background-color: #c97c3e; } #middle { padding-right: 90px; padding-left: 90px; padding-top: 35px; padding-bottom: 43px; background-color: #0F9; } #footer { border-top: 2px solid #ff8800; background-color: #ffd376; position:absolute; width:100%; bottom:0; /* stick to bottom */ } </style> </head> <body> <div id="container"> <div id="header"> Header </div> <div id="middle"> Middle </div> <div id="footer"> Footer </div> </div> </body> </html>

    Read the article

  • Do all widgets in an Android layout file require layout_width and layout_height ?

    - by Eno
    I have a ListView composed of LinearLayouts. Inside each is an ImageView, TextView and another ImageView laid out horizontally: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageButton android:id="@+id/thumbnail" android:background="@color/white" android:paddingTop="10dip" android:paddingLeft="8dip" android:paddingBottom="10dip" /> <TextView android:id="@+id/title" android:background="@color/white" android:textColor="@color/bntext" android:paddingTop="10dip" android:paddingLeft="8dip" /> <ImageButton android:src="@drawable/green_arrow_small" android:background="@color/white" /> </LinearLayout>

    Read the article

  • How can I add a portrait layout on top of a landscape Camera SurfaceView?

    - by user319919
    I need a Camera SurfaceView for my application. The camera should be set to fixed landscape view which is done by setting android:screenOrientation="landscape" for the activity in the AndroidManifest.xml. After doing some experiments and Google researches trying to use setRotation(int) inside the camera preview implementation, I came to the conclusion, that it is obviously the common practice to get a preview with correct behaviour. Now the camera preview itself looks fine for landscape orientation. But I need to have an overlay that holds a bunch of buttons. Due to usability the user interface should be in portrait view (or even better orientation aware). There seemed no other option to me, but to fix the activity screenOrientation, so that the camera preview looks normal (in portrait mode the whole view is streched and rotated to the left) Is there a workaround to get my buttons back to portrait orientation? Or another overall approach to deal with the camera view? Parameters.setRotation(int) obvisouly didnt work. I am quite new to the Android plattform programming. Of course I dont know much about the programming tricks and workarounds yet. I did a lot of research over the last two weeks, but couldnt find the right solution so far.

    Read the article

  • If tables are so evil, why does joomla use tables for its layout?

    - by DMin
    When you create a template you don't use tables. but when joomla rendereds the page, there are at least 4 places where tables are used to structure the content. Does this tell you something about tables or the fact that the joomla community should invest more time and learn how to code css or just the fact that tables are needed when you don't know what css is going to be throw in later(which probably means they are of some use)?

    Read the article

  • CSS Layout-- Make table cell contents appear in row below and set height of parent row/cell

    - by Laramie
    I am modifying a skin for the CKEdit component so that the toolbar is hidden unless clicked. To do so, I moved the toolbar collapser to the row below it using position: relative and top:18px. My goal is to have the parent tr of the anchor element a height of 2px, but keep the anchor at 11px. Is this possible? I cannot alter the DOM, just the styles. Here's my reduced code <style type="text/css"> table { width: 80px;} td { border: solid 1px #ccc; } .header { background-color: #99f; /* This is being ignored */ height:2px; } .below { float: right; position: relative; top: 18px; /*If I shrink, the BG image goes Away*/ height: 11px; width: 11px; background-image: url('http://ckeditor.com/apps/ckeditor/3.3/skins/kama/images/sprites.png'); background-position: 4px -1387px; border: 1px outset #D3D3D3; } .hidden { display:none; } </style> <table> <tr><td class="header"><a class="below"><span class="hidden">#</span></a></td></tr> <tr><td>next row</td></tr> </table>

    Read the article

  • How to convert a fixed height/width-fixed layout to elastic?

    - by phretor
    I used the same software used here http://us.gn.bartal.org/ to create a fixed width/height treemap in HTML + CSS. I would like to make it elastic by having a JavaScript function to convert all pixels absolute positions and sizes to percentages. How would you suggest to proceed? Is there some jQuery/Prototype/Dojo magic that I can exploit?

    Read the article

  • How to optimize 'class name' in Android XML Layout ?

    - by Mac
    Hello, I am using some custom components in my project for that I am using following code. <view class="com.android.mypackage.myclass" id="@+id/button" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:drawable/button" android:padding="10dip" /> Its working perfectly fine, I am using this code near about 35 times in my application. so while creating new clone application from same project, I need to update package name in 35 places. Is there any way to reduce these efforts? I had tried with "class="@string/class_name" but its not working.

    Read the article

  • WPF layout calls MeasureOverride repeatedly in increments of 2?

    - by Scott Whitlock
    I've run into a case where I have a custom Panel (inherits from Panel) and I'm using it as an ItemsPanel in a ListView. When I resize the container that it's in, if I resize it smaller, my panel's MeasureOverride function gets called once, but if I resize it larger (let's say from 100 to 300), it calls MeasureOverride and ArrangeOverride for every value between 100 and 300, in increments of 2 (so 102, 104, etc.). The weird thing is that the container resizes right away (its size gets to 300 immediately). It doesn't seem to matter what I return from MeasureOverride - it just does this. I wish I could make it happen in a really small application and post it here, but I haven't been able to reproduce it like that yet. I can reproduce it all day in my app though. Does anyone know what could cause this?

    Read the article

  • I wrote a new X11 keyboard layout file, how do I get my system to recognize it?

    - by grimborg
    I like to configure my keys my way, so I wrote a keyboard symbols file and I put it in /usr/share/X11/xkb/symbols/cat I use it by running setxkbmap cat -variant dvorak (and it works), but it doesn't show up in the console configuration (dpkg-reconfigure console-setup) nor in the Gnome keyboard settings... nor anywhere else, so I have to run setxkbmap every time. I suppose that I have to register it somewhere, but where? Any hints? Thanks!

    Read the article

  • Can I create a two-column layout that fluidly adapts to narrow windows?

    - by Brant Bobby
    I'm trying to design a page that has two columns of content, div#left and div#right. (I know these aren't proper semantic identifiers, but it makes explaining easier) The widths of both columns are fixed. Desired result - Wide viewport When the viewport is too narrow to display both side-by-side, I want #right to be stacked on top of #left, like this: Desired result - narrow viewport My first thought was simply to apply float: left to #left and float: right to #right, but that makes #right attach itself to the right side of the window (which is the proper behavior for float, after all), leaving an empty space. This also leaves a big gap between the columns when the browser window is really wide. Wrong - div#right is not flush with the left side of the viewport Wrong - div#right is not on top of div#left Applying float: left to both divs would result in the wrong one moving to the bottom when the window was too small. I could probably do this with media queries, but IE doesn't support those until version 9. The source order is unimportant, but I need something that works in IE7 minimum. Is this possible to do without resorting to Javascript?

    Read the article

  • Is it okay to rely on javascript for menu layout?

    - by Ryan
    I have a website template where I do not know the number of menu items or the size of the menu items that will be required. The js below works exactly the way I want it to, however this is the most js I've every written. Are there any disadvantages or potential problems with this method that I'm not aware of because I'm a js beginner? I'm currently manually setting the padding for each site. Thank you! var width_of_text = 0; var number_of_li = 0; // measure the width of each <li> and add it to the total with, increment li counter $('li').each(function() { width_of_text += $(this).width(); number_of_li++; }); // calculate the space between <li>'s so the space is equal var padding = Math.floor((900 - width_of_text)/(number_of_li - 1)); // add the padding the all but the first <li> $('li').each(function(index) { if (index !== 0) { $(this).css("padding-left", padding); } });

    Read the article

  • Change XRDP keyboard layout to en-gb Ubuntu 12.04

    - by Earl Sven
    Does anybody know how to change the keyboard layout to en-gb in an XRDP session on Ubuntu 12.04? I am using mstsc.exe to connect to an XRDP server hosting an XVNC session, however I cannot work out how to apply the UK keyboard layout. A bit of googling has yeilded these instructions which allow me to change the keymap, however using the keymap file I downloaded from here I loose the ability to use the arrow keys, home/end etc. Comparing the file with the standard one there are substantially more differences than I would expect considering the similarity between the layouts. I only have RDP access to the box so i don't seem to be able to actually generate a new layout per the instructions above, maybe it's a local console thing? Also I can't change either the RDP client used or the RDP server as they are my only access to the system, I don't have local console access. I do have root priveleges on the OS however. Any thoughts? Edit: I have found http:// xrdp.sourceforge.net/documents/keymap/newkeymap.html (apologies for not typing the link properly but the antispam filter won't let me post more than 2 links) this documentation on the XRDP sourceforge page which describes keymap file format. It indicates the values in the keymap files are unicode 0x64 etc, however the files I have already on my system seem to use a different format 0:0 or 65307:27 etc, does anybody know what the difference is?

    Read the article

  • Can layouts be chosen by Grails controllers?

    - by maerics
    I'm building a CMS as a learning exercise in Grails and would like to give content managers the ability to choose between different HTML page structures (e.g. 2 column, 3 column, etc). Grails Layouts seem like a logical choice but is it possible for a Grails controller to explicitly name which layout will be used for rendering? Ideally there would be a layout option to the render method, per Ruby on Rails but I don't see anything like it. It seems like it might be possible using the applyLayout method by passing the name of the layout but this requires each GSP page to explicitly request layout (annoying overhead per-page) rather than using Layout by Convention. Any ideas?

    Read the article

  • Qt hide QLayout (switch between two layouts)

    - by Lodhart
    I didn't find solution for my problem with two QLayouts. I need app with QHBoxLayout with possible expandind when I will add new widgets, push buttons, .... So what I have: One QDialog and two layouts. Now I know that I can't hide the layout. So I tray just : layout()->removeItem(firstlayout); layout()->addLayout(secondLayout); But when I did this, I saw all items in first layout on possition [0,0]. So next step I try: for (all items in first layout) if (widget) widget->hide(); But this is working only with QWidget and I have many different items in layouts. Simply way is use the widget, because there is possibole to use hide/show, but I need auto expanding window when I add new items.

    Read the article

  • Get Layout Shape Corresponding to Slide Shape

    - by Ryan
    In PP2007 and using VBA, how can I get the placeholder shape on a Slide Master layout that is the "master" for a placeholder shape on the slide? I am currently using a loop to compare the position and size of the slide placeholder with the position and shape of each placeholder shape in the slide's layout, but this isn't fool-proof. For example, if the placeholder shape is moved on the slide, its position may no longer match the position of any placeholder shapes in the slide's layout. I could reapply the slide's layout to snap placeholders back into position, but that's not what I want to do. Something in the object model like "Shape.Master" would be ideal but, of course, that doesn't exist.

    Read the article

  • Android ViewPager Displaying TextView in Layout

    - by Ammonious
    I'm having a problem getting my viewpager to work correctly. Currently the bottom part of my layout will page across but the remaining part will not Here's my code that I have in my PageAdapter public class MyPageAdapter extends PagerAdapter { public int getCount() { return 31; } public Object instantiateItem(View collection, int position) { LayoutInflater inflater = (LayoutInflater) collection.getContext() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); int resId = 0; switch (position) { case 0: resId = R.layout.main_menu; break; case 1: resId = R.layout.article1; break; case 2: resId = R.layout.article2; break; .... .... View view = inflater.inflate(resId, null); ((ViewPager) collection).addView(view, 0); return view; This is what I have for my XML <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@drawable/background" android:clickable="true" android:id="@+id/layout13" android:weightSum="0"> <TextView android:id="@+id/textView01" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical|center_horizontal" android:padding="12dp" android:text="@string/article13" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000" /> <TextView android:id="@+id/textView02" android:layout_width="match_parent" android:layout_height="302dp" android:gravity="center_vertical|center_horizontal" android:text="@string/body13" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000" /> <android.support.v4.view.ViewPager android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@id/viewPager" > </android.support.v4.view.ViewPager> </LinearLayout> I've tried Moving the around in my XML layout to right underneath my LinearLayout and i get the full screen but all my text disappears. It's probably something simple i'm missing but any help on this would be greatly appreciated!

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >